[R] Plotting questions
Greg.Snow at imail.org
Fri May 8 18:34:13 CEST 2009
For question 2, dev.new (in more recent versions) will start a new instance of the default device (which are the ones listed below), but in a cross-platform way (so you don't need to remember all 3, and code will work on the other platforms).
A link to dev.new should probably be included in the "see also" section of the help page for windows/x11/quartz, but I don't know if it is important enough for a formal bug report.
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Richard.Cotton at hsl.gov.uk
> Sent: Friday, May 08, 2009 4:01 AM
> To: lehe
> Cc: r-help at r-project.org; r-help-bounces at r-project.org
> Subject: Re: [R] Plotting questions
> > 1. How to plot several lines in a figure? Suppose I have several sets
> > points (xi,yi), where xi and yi are equal-length vector. plot(x1,y1)
> > give a line connecting these points. Another plot(x2,y2) will erase
> > plot before and plot the new line. Can I have these lines all drawn
> > same figure?
> #Draw your plot
> #Add lines to the existing plot
> #Add points to the existing plot
> points(runif(20), col="red")
> > 2. How to open another figure window? Repeating plot will redraw in
> > window instead of opening another one.
> On Windows, windows() will open a new figure window; quartz() on Mac
> and x11() on Linux do the same.
> Mathematical Sciences Unit
> This message contains privileged and confidential
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help