[R] New trellis settings

Deepayan Sarkar deepayan at stat.wisc.edu
Tue Nov 30 23:33:50 CET 2004


On Tuesday 30 November 2004 13:33, David Hinds wrote:
> On Mon, Nov 29, 2004 at 11:23:35PM -0600, Deepayan Sarkar wrote:
> > > Specifically, I have some code that in the past changed the
> > > relative proportions of text versus the plot area using:
> > >
> > >   trellis.par.set('fontsize', list(text=8))
> > >
> > > which caused all text to get smaller, and the plot area to grow
> > > to fill the larger available space.  Now, the plot area does not
> > > grow on its own.
> >
> > That does seem to have been a side-effect in 1.9.1, but it was
> > never intended. I would consider that behaviour a bug, not a
> > feature.
>
> It was a pretty convenient bug! ;)
>
> > > str(trellis.par.get()$layout.heights)
> >
> > List of 18
> >  $ top.padding      : num 1
> >  $ main             : num 1
> >  $ main.key.padding : num 1
> >  $ key.top          : num 1
> >  $ key.axis.padding : num 1
> >  ...
> >
> > I was hoping that the names would be enough of a hint. Anything
> > with 'padding' in the name is space, and probably the ones you want
> > to change.
>
> 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.)

Deepayan




More information about the R-help mailing list