Re: [R] Lattice: how to get default ylim?

From: Paul Murrell <>
Date: Fri 20 May 2005 - 06:24:40 EST


Deepayan Sarkar wrote:

> On Thursday 19 May 2005 9:11 am, David James wrote:

>>Deepayan Sarkar wrote:
>>>> v <- current.viewport() ## requires R 2.1.0 (I believe)
>>>No, I think it's been there for a while. However, AFAIR the fact that
>>>viewports have components xscale and yscale that can be accessed like
>>>this is undocumented and may change if the implementation changes (which
>>>is a real possibility).
>>>Ideally, there should be exported interfaces to access this information,
>>>either in grid or lattice. One of the reasons there isn't is that you
>>Yes, I agree that such an interface is quite desirable.
> OK, I'll put something in the next version of lattice.

The expression I recommend for this sort of thing is something like ...

convertY(unit(0:1, "npc"), "native", valueOnly=TRUE)


Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Fri May 20 06:27:38 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:55 EST