[R] Help with Plotting Function

Sundar Dorai-Raj sundar.dorai-raj at PDF.COM
Fri May 21 18:49:11 CEST 2004



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




More information about the R-help mailing list