[R] Padding in lattice plots

Federico Gherardini f.gherardini at pigrecodata.net
Sat Jul 16 18:12:03 CEST 2005


On Friday 15 July 2005 17:00, Deepayan Sarkar wrote:
> On 7/15/05, Federico Gherardini <f.gherardini at pigrecodata.net> wrote:
> > On Friday 15 July 2005 14:42, you wrote:
> > > Hi all,
> > > I've used the split argument to print four lattice plots on a single
> > > page. The problem now is that I need to reduce the amount of white
> > > space between the plots. I've read other mails in this list about the
> > > new trellis parameters layout.heights and layout.widhts but I haven't
> > > been able to use them properly. I've tried to input values between 0
> > > and 1 as the padding value (both left and right and top and bottom) but
> > > nothing changed. It seems I can only increase the padding by using
> > > values > 1. Any ideas?
> > >
> > > Thanks in advance for your help
> > > Federico Gherardini
> >
> > It seems like I've found an answer myself.... you have to use negative
> > values to decrease the padding. I thought it was something like the cex
> > parameter which acts like a multiplier
>
> I thought so too.
>
> > but this is not the case.
>
> Could you post what you used? There are several different padding
> parameters you need to set to 0, did you change them all?
>
> Deepayan

Hi Deepayan
This is what I used.... I don't know if I did everything the "proper" way but 
at least I got the result I was seeking! :)

trellis.par.set(list(layout.heights = list(top.padding = -1)))

trellis.par.set(list(layout.heights = list(bottom.padding = -1, 
axis.xlab.padding = 1, xlab = -1.2)))

trellis.par.set(list(layout.widths = list(left.padding = -1)))

trellis.par.set(list(layout.widths = list(right.padding = -1, 
ylab.axis.padding = -0.5)))

Do these settings make any sense?

Federico




More information about the R-help mailing list