[R] Plotting points from two vectors onto the same graph

K Fernandes kafernan at uwaterloo.ca
Fri Jan 21 02:51:04 CET 2005


Hello,

I have three vectors defined as follows:

> x<-c(10,20,30,40,50)
> y1<-c(154,143,147,140,148)
> y2<-c(178,178,171,188,180)

I would like to plot y1 vs x and y2 vs x on the same graph.  How might I do
this?  I have looked through a help file on plots but could not find the
answer to plotting multiple plots on the same graph.

Thank you for your help,
K




More information about the R-help mailing list