R plot legend with transparent background

2020-08-17 18:07发布

问题:

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

回答1:

Use: bg="transparent" in

legend()

Such as:

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