Hi, I am new to R. I have two questions about plotting in R: 1. How to plot several lines in a figure? Suppose I have several sets of points (xi,yi), where xi and yi are equal-length vector. plot(x1,y1) will give a line connecting these points. Another plot(x2,y2) will erase what plot before and plot the new line. Can I have these lines all drawn in the same figure? 2. How to open another figure window? Repeating plot will redraw in the same window instead of opening another one. Thanks and regards! -Tim -- View this message in context: http://www.nabble.com/Plotting-questions-tp23442445p23442445.html Sent from the R help mailing list archive at Nabble.com.
> 1. How to plot several lines in a figure? Suppose I have several sets of > points (xi,yi), where xi and yi are equal-length vector. plot(x1,y1)will> give a line connecting these points. Another plot(x2,y2) will erase what > plot before and plot the new line. Can I have these lines all drawn inthe> same figure?#Draw your plot plot(seq(0,1,length.out=20)) #Add lines to the existing plot lines(runif(20)) #Add points to the existing plot points(runif(20), col="red")> 2. How to open another figure window? Repeating plot will redraw in thesame> window instead of opening another one.On Windows, windows() will open a new figure window; quartz() on Mac OSX and x11() on Linux do the same. Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}
>>> lehe <timlee126 at yahoo.com> 08/05/2009 09:58:40 >>> >1. How to plot several lines in a figure?See ?lines>2. How to open another figure window?see ?windows ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}