amna khan wrote: > > I did not find any function of graph which plot one variable on x-axis and > 2 > or more than 2 variables on y-axis. >
You can use xyplot() from the package lattice. library(lattice) xyplot(y1+y2+y3~x) I suspect, the problem is, that plot() erases everything that was plotted earlier and establishes a new coordinate system in the plotting window. In case of basic graphics, you can set par(new=TRUE) and call plot() several times. points(), lines() and other functions from the basic graphics will add new curves to the existing plot. Initially, you must set axis ranges large enough to fit everything you want to plot. -- View this message in context: http://www.nabble.com/plots-tf4141246.html#a11780013 Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
