[R] plot() axis problem

Petr Pikal petr.pikal at precheza.cz
Fri Jul 27 11:22:48 CEST 2001



On 23 Jul 2001, at 11:18, Bill Simpson wrote:

> > 
> > The example uses a rather artificial dataset, neatly divided into
> > monotonically increasing low and high values.  Any permutation of
> > those values that did not fall into that pattern would render the
> > question meaningless.  For example, try
> The example I posted was artificial because my real example had 10,000
> pts and I didn't want to post that. Basically I wanted to look at the
> region surrounding one frequency of the spectrum where I expected a
> peak. I couldn't see the peak because plot() had used the whole set of
> data to pick the range for the y-axis.
> 
> There was of course a nice peak but it was invisible because this peak
> was maybe 1/1000 as high as the maximum peak in the whole spectrum.
> 
Sorry to to join this thread so late but I was occupied and did not 
read my post a while.

I deal with similar sets of data with peaks and I use quite short 
function for interactive zooming.

Here it is:

replot_function(x,y)
{
body_locator(2)
dmx_min(body$x)
hmx_max(body$x)
dmy_min(body$y)
hmy_max(body$y)
plot(x,y,xlim=c(dmx,hmx),ylim=c(dmy,hmy),type="l")
}

It has to be called after plotting x,y and you shall pinpoint to opposit 
corners. I call it repetitively without any problems. Maybe it can help 
you.

> > 
> > I think the present behavior of plot() is pretty sensible.
> If you look around at other plotting programs out there I think you'll
> see some doing what I propose. I think if you use small datasets the
> current plot() behaviour will not cause problems. It's only a pain
> once you start zooming in on small stretches.
> 
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._


Petr

petr.pikal at precheza.cz
p.pik at volny.cz

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