14

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

Qbik
  • 5,885
  • 14
  • 62
  • 93

1 Answers1

30

Use: bg="transparent" in

legend()

Such as:

legend("right",bg="transparent",col=c(as.numeric(unique(df$group2))),cex=0.5)
Shicheng Guo
  • 1,233
  • 16
  • 19