How to R plot legend with transparent background when using plot()
function ?
R plot legend with transparent background
Asked Answered
Use: bg="transparent" in
legend()
Such as:
legend("right",bg="transparent",col=c(as.numeric(unique(df$group2))),cex=0.5)
© 2022 - 2024 — McMap. All rights reserved.
bty="n"
insidelegend
– Rowlocklegend
accepts the bg argument, so that you can fill in the background with a different color if desired. – Haunt