R plot legend with transparent background
Asked Answered
Q

1

15

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

Quadrature answered 29/4, 2016 at 13:20 Comment(2)
you can use bty="n" inside legendRowlock
Note also that legend accepts the bg argument, so that you can fill in the background with a different color if desired.Haunt
B
30

Use: bg="transparent" in

legend()

Such as:

legend("right",bg="transparent",col=c(as.numeric(unique(df$group2))),cex=0.5)
Belligerent answered 16/8, 2016 at 21:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.