Re: [R] Range difference of plot two arrays in one plot

2013-02-01 Thread Yuan, Rebecca
rom: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, February 01, 2013 11:39 AM To: Yuan, Rebecca Subject: Re: [R] Range difference of plot two arrays in one plot On Feb 1, 2013, at 10:28 AM, Yuan, Rebecca wrote: > Hello all, > > When I tried to plot the following two

Re: [R] Range difference of plot two arrays in one plot

2013-02-01 Thread Jeff Newmiller
One method is to follow correct usage of base graphics and only use the plot function once for each plot. To overlay, use a function like points or lines. Another approach is to use lattice graphics or ggplot2 and give the data to higher-level plot routines that know how to plot multiple groups

[R] Range difference of plot two arrays in one plot

2013-02-01 Thread Yuan, Rebecca
Hello all, When I tried to plot the following two arrays in one figure with the following: x = c(0,0,0,10,20,30) y = c(40,50,60,70,80,90) plot(x, type='o', ylim=c(min(x),max(x))) par(new=T) plot(y, type='l', ylim=c(min(y),max(y))) Found that the first points and last points from those two arrays