We were wondering if there was a simple way to plot two series, say y and z, against a series x and have both series appear in the same plot. For example the function plot(x~y+z) generates two scatter plots, one with y against x and the other with z against x. Is there any way to obtain both on the same picture? Thanks for your help Sangeeta -- ______________________________________________________________________________ Sangeeta Pratap email:pratap at itam.mx Centro de Investigaci?n Econ?mica phone:52 55 56284000 extn.2966 Instituto Tecnol?gico Aut?nomo de M?xico fax: 52 55 56284058 Av. Camino de Santa Teresa 930 10700, Mexico D.F
See ?matplot. On May 13, 2003 11:21 am, Sangeeta Pratap wrote:> Content-Length: 800 > Status: R > X-Status: N > > > We were wondering if there was a simple way to plot two series, say y > and z, against a series x and have both series appear in the same plot. > > For example the function plot(x~y+z) generates two scatter plots, one > with y against x and the other with z against x. Is there any way to > obtain both on the same picture? > > Thanks for your help > > Sangeeta
See ?matplot. Alternatively, using xyplot from the lattice package, xyplot(y + z ~ x, allow.m = TRUE) On Tuesday 13 May 2003 13:21, Sangeeta Pratap wrote:> We were wondering if there was a simple way to plot two series, say y and > z, against a series x and have both series appear in the same plot. > > For example the function plot(x~y+z) generates two scatter plots, one with > y against x and the other with z against x. Is there any way to obtain > both on the same picture? > > Thanks for your help > > Sangeeta