R plot legend with transparent background

How to use legend R with transparent background when using plot() function?

+7
r plot legend alpha-transparency
source share
1 answer

Usage: bg = "transparent" in

 legend() 

For example:

 legend("right",bg="transparent",col=c(as.numeric(unique(df$group2))),cex=0.5) 
+16
source share

All Articles