[R] HOW to resize existing graphics window??

Philippe Grosjean phgrosje at ulb.ac.be
Mon Oct 14 15:33:11 CEST 2002


If you need to redimension the graph window before drawing a new graph with
different requirements of the previous one, the quick and easy answer is to
close the previous graph window and to create a new one with the desired
dimensions. For instance:

windows(width=6, height=4)
graph1 <- dev.cur()
plot(rnorm(50, rnorm(50))

# If you want to change the size of graph1 before drawing a new plot:
dev.off(graph1)
graph1 <- windows(width=5, height=5)
hist(rnorm(200))

Best,

Philippe Grosjean

>On Sun, 13 Oct 2002, [koi8-r] .......... wrote:

>> Sorry for newbie question, but i havent find the way to
>> resize existing graphics window from r console. Of course,
>> i can do it by dragging window borders and i can
>> set up size of the device (window) if i call
>> windows(width,height)
>> but is it really impossible to resize existing window??
>> how i can do this?
>> i am using R 1.6.0 on Microsoft Windows 2000 OS
>> Thanks for your help

Prof. B. Ripley replied:
>There is no way to resize an existing graphics window from the command
>line on any of the R graphics platforms, and no one has ever asked for
>this before.  Why do you want to do it?

>It would not be very difficult to implement, so if you would like to
>contribute the code, please do so.





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list