?lines ?points Something like :
x <- 1:10 y1 <- rnorm(10, 4, 3) y2 <- rnorm(5,5,2) ymax <- max(c(y1,y2)) ymin <- min(c(y1,y2)) plot(x, y1, col='red',ylim = c(ymin,ymax)) lines(y2, col='green') --- On Fri, 10/9/09, carol white <wht_...@yahoo.com> wrote: > From: carol white <wht_...@yahoo.com> > Subject: [R] plot the same types of graphics on the same R graphic device > To: r-h...@stat.math.ethz.ch > Received: Friday, October 9, 2009, 5:10 PM > Hi, > How to plot the same types of graphics on the same R > graphic device? Suppose that we want to plot a vector y > against x (using plot for instance). How is it possible to > plot y against x for different values of these two vectors > on the same device so that the plots could be compared? > > Cheers, > > Carol > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ ______________________________________________ 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.