[R] R graphics display window

Duncan Murdoch murdoch at stats.uwo.ca
Fri Aug 17 13:14:02 CEST 2007


On 16/08/2007 7:35 PM, Felipe Carrillo wrote:
> Hi all:
> How can the R graphics window be customized
> programmatically? Either minimized,maximized or change
> the size of the default that ships with R.

Which device are you working with?  Most of them allow the size to be 
selected in the initial call to open the window, e.g.

windows(2,2) for a very small window.  (The sizes are in inches, 
assuming your monitor reports the size of its pixels correctly.)

options("device") allows you to choose a new default; e.g.

options(device=function() windows(2,2))

to always get very small windows.

I don't know if any of the devices support programmatic changes from R 
code, but in Windows you could do most changes by sending Windows 
messages to the window or doing Windows API calls.  You can get the 
handle using getWindowsHandle(), and then you'll need to write C code to 
do the work.

Duncan Murdoch

> Thanks
> 
>  Felipe D. Carrillo
>   Fishery Biologist
>   US Fish & Wildlife Service
>   Red Bluff, California 96080
> 
> ______________________________________________
> 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.



More information about the R-help mailing list