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 [[alternative HTML version deleted]]
On Sep 19, 2014, at 10:48 AM, IZHAK shabsogh <ishaqbaba at 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 > IshaqSee ?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
Looks like homework to me. cheers, Rolf P. S. In any case, so some basic reading of introductory R material, available from the R web page. R. On 20/09/14 03:48, IZHAK shabsogh 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)-- Rolf Turner Technical Editor ANZJS