[R] graph dimensions default

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 14 13:43:08 CEST 2007

On Tue, 14 Aug 2007, Simon Pickett wrote:

> Hi,
> I would like to (if possible) set the default width and height for graphs
> at the start of each session and have each new graphic device overwrite
> the previous one.

Hmm.  It is graphics devices that have dimensions, and plots that 
overwrite other plots on a device, so your intentions are pretty unclear. 
(If you resize a device window the plot dimensions change so they are not 
intrinsic to the plot.)

If you want the default behaviour to be like normal but with, say, a wider 
onscreen device window you can have (on Windows, which you didn't say)

mywindows <- function(...) windows(width=10, height=6, ...)

in your ~/.Rprofile .  Otherwise, please try again to tell us what you 
do want.

> I only know how to do this using windows(width=,height=...) which opens up
> a new plotting device every time, so I end up with lots of graphs all over
> the place until I get the one I want!
> Thanks in advance,
> Simon
> Simon Pickett
> PhD student
> Centre For Ecology and Conservation
> Tremough Campus
> University of Exeter in Cornwall
> TR109EZ
> Tel 01326371852
> http://www.uec.ac.uk/biology/research/phd-students/simon_pickett.shtml
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

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