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

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

c++ - In an add-in in Excel, written in C(++), how does one get the name of the function which called into the addin? -