[R] plot() axis problem

Bill Simpson wsi at gcal.ac.uk
Mon Jul 23 10:07:25 CEST 2001


Thanks for your reply Paul.

> >
> > plot(x,y,xlim=xrange,ylim=range(y[x<=max(xrange) & x>=min(xrange)]))
> >
> > I suggest that plot() changes to this default behaviour.
> 
> 
> The only objections I can think of so far concern (backward) compatibility:
> (i) R currently does what S-Plus does -- that helps portability of S code
> (ii) If we made this change then users' existing R code might start behaving
> differently
> 
> The second problem is a fairly significant one I think -- it is impossible
> to check for all instances and the change would be potentially quite
> dramatic.  Perhaps you could argue that it would be sufficiently rare ...?
> 
> Any other arguments for or against?
It seems like I'm the only one who cares about this...
Maybe it is only an issue when you want to look at small stretches of a
long dataset. I personally ran into it when I wanted to look at small
stretches of a power spectrum of a very long time series.

I will only argue again that it seems logical to use a y-axis that spans
the range of values plotted, and that this therefore depends on xlim.

I guess I can use myplot() that behaves the way that seems sensible to
me.

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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