[R] plot() function

Roger Peng rpeng at stat.ucla.edu
Mon May 13 22:06:51 CEST 2002


You might want:

plot(x, y1, ylim = range(c(y1, y2)), type="l")
lines(x, y2)

assuming x, y1, and y2 are vectors of numbers.

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Mon, 13 May 2002, Markus Haag wrote:

> Dear List Members,
> 
> I have one basic question concerning the plotting abilities of the R
> language. I'd like to plot 2 functions (x,y1 and x,y2)  which should appear in one
> graphic window but I didn't manage to do that and I haven't found any advice
> on that in one of the several FAQ's.
> I am only able to plot the first function: plot(x,y1).
> any help would be appriciated.
> 
> bye,
> 
> Markus
> 
> -- 
> GMX - Die Kommunikationsplattform im Internet.
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list