On Sep 19, 2014, at 10:48 AM, IZHAK shabsogh <ishaqb...@yahoo.com> wrote:
> Hi, > kindly give me some guide on how to plot the following data in a single line > graph that is ( y1,y2,y3,y4 against x) including title and key > > y1<-c(0.84,1.03,0.96) > y2<-c(1.30,1.46,1.48) > y3<-c(1.32,1.47,1.5) > y4<-c(0.07,0.07,0.07) > x<-c(500,1000,2000) > > Thanks > Ishaq See ?matplot and ?legend matplot(x, cbind(y1, y2, y3, y4), type = "l", main = "Plot Title", ylab = "Y Vals", xlab = "X Vals") legend("right", lty = 1:4, col = 1:4, legend = c("y1", "y2", "y3", "y4")) Regards, Marc Schwartz ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.