[R] New trellis settings

Deepayan Sarkar deepayan at stat.wisc.edu
Wed Dec 1 00:30:14 CET 2004


On Tuesday 30 November 2004 17:01, David Hinds wrote:
> On Tue, Nov 30, 2004 at 04:33:50PM -0600, Deepayan Sarkar wrote:
> > > I've fiddled with these and can pretty much get what I want.  But
> > > without really understanding what I'm doing.  It isn't clear to
> > > me, for instance, why the "key" settings affect my plot when no
> > > key is drawn.
> >
> > It shouldn't (unless you have messed with lattice.options()). Can
> > you provide an example? The following doesn't do anything unusual
> > for me:
> >
> > xyplot(1~1,
> >        par.settings =
> >        list(layout.heights = list(key.top = 100, key.bottom =
> > 100)))
> >
> > (I'm running r-devel though, so there's a small chance something
> > might be different.)
>
> I'm only talking about the *.padding options, like:
>
>   xyplot(1:4~1:4,
>          par.settings=list(layout.heights=list(key.axis.padding=10)))

Ah. Well, the layout always contains a row for the key (with height 0), 
even if the key is not actually there (the same holds for all the other 
components). Not having it would mean a lot of headache for me (as the 
programmer) since I would have to keep track of a lot of information to 
know which row in the layout corresponds to what. 

So, for instance, the space above the plot area (assuming no key, no 
main) would be [the space at the top] + [space between the 0-height 
main and the 0-height key] + [space between the key and the top axes].

Deepayan




More information about the R-help mailing list