Dear List: I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6). I am trying to plot x_1 against x_2 and x_3. I have tried plot(x_2, x_1) #obviously works fine plot(x_3, x_1, add=TRUE) # Does not work. I keep getting error messages. I would also like to add ablines to this plot. I have experimented with a number of other plotting functions and I cannot seem to get this to work. The data are student achievement data. I am trying to plot percentile ranks against scale scores for different grade levels. When plotted as such, they look like logistic curves. I am trying to show graphically the distance along x a student must grow simply to remain at the same percentile rank, y. Thanks. Harold C. Doran One Massachusetts Avenue, NW ยท Suite 700 Washington, DC 20001-1431 202.336.7075 [[alternative HTML version deleted]]
Harold Doran wrote:> Dear List: > > I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6). > > I am trying to plot x_1 against x_2 and x_3. > > I have tried > > plot(x_2, x_1) #obviously works fine > > plot(x_3, x_1, add=TRUE) # Does not work. I keep getting error messages. > > I would also like to add ablines to this plot. > > I have experimented with a number of other plotting functions and I cannot seem to get this to work. > > The data are student achievement data. I am trying to plot percentile ranks against scale scores for different grade levels. When plotted as such, they look like logistic curves. I am trying to show graphically the distance along x a student must grow simply to remain at the same percentile rank, y. > > Thanks. > > > Harold C. Doran > One Massachusetts Avenue, NW ?? Suite 700 > Washington, DC 20001-1431 > 202.336.7075 > >Harold, Looks like you're looking for ?points or ?lines. plot(x_2, x_1) lines(x_3, x_1) --sundar
On Fri, May 21, 2004 at 12:41:53PM -0400, Harold Doran wrote:> Dear List: > > I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6). > > I am trying to plot x_1 against x_2 and x_3. >Sundar has already answered the question - here's another trick for displaying multiple data sets with lines, etc, to avoide cluttering any one plot too much... data(iris) library(lqs) plot(iris[,1:3],panel=function(x,y,...) { points(x,y,...) zz <- ltsreg(y~x) abline(zz) }) Cheers Jason -- Indigo Industrial Controls Ltd. http://www.indigoindustrial.co.nz 64-21-343-545 jasont at indigoindustrial.co.nz