Re: [R] Unspecified [upper] xlim/ylim?

From: William Dunlap <wdunlap_at_tibco.com>
Date: Tue, 15 Jun 2010 09:01:24 -0700

> -----Original Message-----
> From: r-help-bounces_at_r-project.org
> [mailto:r-help-bounces_at_r-project.org] On Behalf Of
> Ted.Harding_at_manchester.ac.uk
> Sent: Tuesday, June 15, 2010 8:49 AM
> To: r-help_at_stat.math.ethz.ch
> Subject: [R] Unspecified [upper] xlim/ylim?
>
> Greetings!
> I would like to be able to specify a fixed (say) lower limit
> for plotting, while leaving the upper limit "floating, when
> plotting. The context is that the maximum in the data to be
> plotted is unpredictable, being the consequence of a simulation,
> whereas I know that it cannot be less than (say) 0; and I want
> to fix the lower limit at 0 in any plot, leaving the upper limit
> to be assigned by plot() as a result of the computed values.
>
> I know I can do this by determining the max() of the data, and
> then computing a "Ymax" to put in (say) ylim = c(0,Ymax). However,
> for certain reasons, I would prefer not to have to do this.
> (And it's just a preference ... ).
>
> Whereas one can leave the whole issue of setting both plotting
> limits to plot(), by not specifying ylim (or xlim), or one can
> explcitily specify both the upper and lower limits by (say)
> ylim=c(Ymin,Ymax), there seems to be no way of fixing one and
> leaving the other floating so that plot() would do its own thing.
>
> ylim requires two numbers to be given. Things like ylim=c(0,)
> or ylim=c(0,NA) would generate an error.

Currently ylim=c(yValueAtBottomOfPlot, yValueAtTopOfPlot), not c(yMin,yMax). E.g., ylim=c(10,0) means to reverse the y axis, with 0 at the top and 10 at the bottom. Putting an NA into ylim seems attractive but doesn't it run into problems because ylim doesn't mean c(yMin,yMax)?

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com

>
> Am I chasing a phantom? Or is there a way?
> ThanksTed.
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding_at_manchester.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 15-Jun-10 Time: 16:49:09
> ------------------------------ XFMail ------------------------------
>
> ______________________________________________
> R-help_at_r-project.org 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.
>



R-help_at_r-project.org 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. Received on Tue 15 Jun 2010 - 16:05:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Jun 2010 - 17:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive