Opaque legend in an R plot with transparent background? -


i'm trying put legend in r plot, on top of grid lines. want legend opaque, grid lines not show through legend. however, want whole image have transparent (not white) background, display on web.

i know can bg="white" opaque legend, not combine png(..., bg=transparent). example:

    png("test.png", bg="transparent")     plot(rnorm(10))     grid()     legend("topright", legend="foo", bg="white")     dev.off() 

when png displayed on website coloured background, colour show through of plot, legend still white. there way make legend "opaque", grid lines don't show through, still have transparent in final png output?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -