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.
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
Hello Dan, Look at the code of the plot.default function, you'll see that's not possible to specify one limit, nevertheless, you can do : plot(x,y,ylim=c(0,max(y))) Does it work for you ? Cordialement. Romain. Dan Bolser a ?crit :>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. > > >-- Romain FRANCOIS : francoisromain at free.fr page web : http://addictedtor.free.fr/ (en construction) 06 18 39 14 69 / 01 46 80 65 60 _______________________________________________________ Etudiant en 3eme ann?e Institut de Statistique de l'Universit? de Paris (ISUP) Fili?re Industrie et Services http://www.isup.cicrp.jussieu.fr/