RE: [R] Lattice: finding out xlim within panel function

About this list Date view Thread view Subject view Author view Attachment view

From: Lutz Prechelt (prechelt@pcpool.mi.fu-berlin.de)
Date: Wed 05 May 2004 - 02:26:15 EST


Message-id: <85D25331FFB7AE4C900EA467D4ADA392045919@circle.pcpool.mi.fu-berlin.de>


> >>while within a panel function for xyplot, how can I
> >>find out the values of (effectively) xlim and
> >>ylim -- no matter whether they have been set
> >>explicitly or chosen by Lattice itself?
...
> > Not surprising, since there's no documented way to do this.
> > You could
> > try something along these lines, but this exact construct is not
> > guaranteed to work in future versions of grid:
> >
> > cvp = grid::current.viewport()
> > print(cvp$xscale)
...
> Can you tell me
> more about what you are trying to do?

I am writing a panel function that will (among other
things) plot a regression line for a scatter plot
and add curves for confidence or prediction intervals.
I want the intervals to cover not only the
x-range of the data, but the whole length of the
axis.

And while for drawing the line I need not know
the size of the scale (by using abline),
there is nobody taking it off me to decide where
to start and stop drawing the curves for the
intervals.

  Lutz

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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST