[R] legend with cofor-filled symbol

Duke duke.lists at gmx.com
Thu Sep 15 22:40:53 CEST 2011


Hi folks,

Please let me know what I am doing wrong. I want to have a legend with 
symbols that are filled with same color as the drawn line, but I failed 
to do that:

plot(1:100, 1:100, pch=21, bg="red")
legend("bottomright", "test", bty='n', pch=21, bg="red", col="red")

It looks to me that the "bg" option in legend does not work properly as 
in plot.

Please help,

Thanks,

D.



More information about the R-help mailing list