[R] Margin on trellis plot
Richard.Cotton at hsl.gov.uk
Richard.Cotton at hsl.gov.uk
Mon Oct 6 13:51:49 CEST 2008
> I have a problem when I make a trellis plot - I would like to reduce
> the white margin surrounding the plot.
>
> I used S some years age, as I remember it was possible to use the
> "par" and "oma" to control margin size even on a trelllis plot (see
> the plot below).
>
> However, it does not seem to work in R.
par is used with base graphics. Changing the par settings will not
usually affect grid/lattice graphics. See ?trellis.par.set and, for
example, http://www.ats.ucla.edu/stat/Splus/faq/trellis_pars.htm or "R
Graphics",chapter 4, by Paul Murrell.
In the code below, pick any number less than 1 for the padding values to
decrease it from the default.
xyplot(conc ~ Time | Subject,
data = Theoph,
aspect="fill",
par.settings=list(
layout.widths=list(left.padding=0, right.padding=0),
layout.heights=list(top.padding=0, bottom.padding=0)))
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
More information about the R-help
mailing list