I'm studying matplot
and ggplot2
.
I am facing an issue while trying to convert matplot to ggplot2
matplot(iris[,1:4],type="l")
legend("topleft",names(iris)[1:4],lty=c(1,2,3,4),col=c(1,2,3,4))
I really can't bring the Species
part to ggplot2
.
How can I convert this?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.