[R] global option settings for grid and lattice?

Paul Murrell p.murrell at auckland.ac.nz
Mon Dec 11 22:39:55 CET 2006


Hi


Zepu Zhang wrote:
> Hello,
> 
> I'd like to be able to set options for grid and lattice globally, once 
> for all subsequent plots, just like what ps.options() does. I walked 
> through the functions of Grid and didn't find it. The following are 
> related things that are available:
> 
> get.gpar()
> trellis.par.set()
> 
> any ideas? thanks.


ps.options() sets the defaults for a PostScript output device.  It has
no effect, for example, on screen output.

The top-level grid viewport takes most of its default settings from the
device, so it should pick up ps.options() settings (WHEN you are drawing
to a PostScript device).  All grid drawing uses default settings from
the current viewport unless explicitly overridden, so ps.options()
settings should carry through to your drawing (IF you are only using grid).

Lattice decides for itself what the default graphics settings should be
(again, based on the type of device you are drawing to, but using
lattice defaults, NOT ps.options() defaults).  You might want to look at
?trellis.device and read about themes to gain control over default
lattice settings.

Paul
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/




More information about the R-help mailing list