wu sz
2005-Jul-14 12:38 UTC
[R] help: how to change the size of a window after it has been created
Hello, I wish to plot some figures in a window in turn, but the size of these figures is different, so how can I change the size of the window by resetting the parameters before each plotting? Thank you, Shengzhe
Roger D. Peng
2005-Jul-14 12:50 UTC
[R] help: how to change the size of a window after it has been created
Not sure you can do this. You might have to launch separate graphics windows. -roger wu sz wrote:> Hello, > > I wish to plot some figures in a window in turn, but the size of these > figures is different, so how can I change the size of the window by > resetting the parameters before each plotting? > > Thank you, > Shengzhe > > ______________________________________________ > 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 >-- Roger D. Peng http://www.biostat.jhsph.edu/~rpeng/
Marc Schwartz
2005-Jul-14 13:12 UTC
[R] help: how to change the size of a window after it has been created
On Thu, 2005-07-14 at 14:38 +0200, wu sz wrote:> Hello, > > I wish to plot some figures in a window in turn, but the size of these > figures is different, so how can I change the size of the window by > resetting the parameters before each plotting? > > Thank you, > ShengzheOther than dragging a plot window with a mouse, I do not think that there is a way to change the size of an open display device via code (though somebody will no doubt correct me if I am wrong). See ?Devices Depending upon your OS, there is likely a 'width' and 'height' argument for the screen display device for newly opened devices. For example, under systems using X, where X11() is the screen device: X11(width = 11, height = 8) plot(1:10) X11(width = 5, height = 5) barplot(1:5) In the above example, two separate plot windows will be created. If you want to only have one open at a time, you can close the device first using dev.off() before the subsequent plots. However, you lose the current plot as soon as you close it. X11(width = 11, height = 8) plot(1:10) dev.off() X11(width = 5, height = 5) barplot(1:5) dev.off() HTH, Marc Schwartz