Re: [R] plotting multiple lines on single graph ggplot2

2011-11-28 Thread John Kane
--- On Mon, 11/28/11, Abdul Wahid Memon wrote: > From: Abdul Wahid Memon > Subject: Re: [R] plotting multiple lines on single graph ggplot2 > To: "Ben Bolker" > Cc: r-h...@stat.math.ethz.ch > Received: Monday, November 28, 2011, 11:56 AM > Its very much simple. &g

Re: [R] plotting multiple lines on single graph ggplot2

2011-11-28 Thread Abdul Wahid Memon
Its very much simple. Simply, if we do like the following x<-c(100,200,300,400,500) y<-c(1.1, 1.2, 1.3, 1.4, 1.5) a<-c(600, 700, 800, 900, 1000) b<-(1.5, 1.7, 1.9, 2.1, 2.3) plot(x,y) points(a,b) As you can see the call to points() function will superimpose a new curve (with some new points on x-

Re: [R] plotting multiple lines on single graph ggplot2

2011-11-28 Thread Ben Bolker
John Kane yahoo.ca> writes: > > There are probably lots of better aproaches but this seems to work. > I just combined the lines into one vector > and assighed a dummy variable to mark the diffferent lines > > ibrary(ggplot2) > mydata <- data.frame(xrange <- c(100, 200, 300, 400, 500, 600, >

Re: [R] plotting multiple lines on single graph ggplot2

2011-11-28 Thread John Kane
There are probably lots of better aproaches but this seems to work. I just combined the lines into one vector and assighed a dummy variable to mark the diffferent lines ibrary(ggplot2) mydata <- data.frame(xrange <- c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000), yrange =