I am always plotting data.frames.
The style that is fairly easy to use is ggplot(df)+... since one can simply add more geom_lines for additional lines without reshaping/pivoting/melting the source data frame. Notice the help text:
df=data.frame(xx=runif(10),yy=runif(10),zz=runif(10))
require(ggplot2)
ggplot(df) +
geom_line(aes(xx,yy, color='yy'))+
geom_line(aes(xx,zz, color='zz'))+
ggtitle("Title")
The trouble lies in trying to have the lines have points and have those points appear in the legend. What is the simplest manner to do that?
All answers must pertain to the ggplot(df) methodology...