[R] plot.default and open ended limits

Uwe Ligges ligges at statistik.uni-dortmund.de
Sun Jan 9 19:33:01 CET 2005


Dan Bolser wrote:

> Hi, I would like to bound the lower limit of my y scale to zero, and let R
> chose an upper limit.
> 
> Something like
> 
> plot(x,ylim=c(0,))
> 
> or 
> 
> plot(x,ylim=c(0,na))
> 
> but nither of these do the job. I searched the docs, but I can't see a way
> to do this.
> 
> 
> Naturally its nothing I can't do 'by hand', I would just like to know if a
> correct syntax exists.

No, but
   plot(x, ylim = c(0, max(x)))
should do the trick.

Uwe Ligges


> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list