[R] par() defaults in Rprofile
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Oct 20 17:52:55 CEST 2004
On Wed, 20 Oct 2004, Sebastian Luque wrote:
> Dear List,
>
> I've tried to set default par() in .Rprofile by putting the following in
> the .First function:
>
> setHook(packageEvent("graphics", "onLoad"),
> function(...) {graphics::par(cex.axis=1.5, cex.lab=2, las=1)}
> )
>
> My goal was to set par() defaults without opening a device everytime at
> startup. However, the next plot I create doesn't show these defaults. Any
> suggestions? Thanks in advance.
par() only applies to the current device. You will have to specify your
own customized device, something like
X11 <- function(...)
{
grDevices::X11(...)
par(cex.axis=1.5, cex.lab=2, las=1)
}
perhaps? (Namespace issues might defeat you here.)
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list