[R] help: how to change the size of a window after it has been created

2005-07-14 Thread wu sz
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@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


Re: [R] help: how to change the size of a window after it has been created

2005-07-14 Thread Roger D. Peng
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@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/

__
R-help@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


Re: [R] help: how to change the size of a window after it has been created

2005-07-14 Thread Marc Schwartz
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,
 Shengzhe

Other 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

__
R-help@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


Re: [R] help: how to change the size of a window after it has been created

2005-07-14 Thread Anon.
Marc Schwartz wrote:
 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,
Shengzhe
 
 
 Other 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).
 

Perhaps some lateral thinking is called for.  Rather than change the 
size of the window, how about changing the size of the plotting region 
within the window.  For example:

split.screen(matrix(c(0,0.5, 0,1,  0.5,1,0,1), ncol=4, byrow=T))
plot(1:5)
close.screen(all=T)

split.screen(matrix(c(0,0.5, 0,0.5,  0.5,1,0.5,1), ncol=4, byrow=T))
plot(1:5)
close.screen(all=T)

Bob

-- 
Bob O'Hara

Dept. of Mathematics and Statistics
P.O. Box 68 (Gustaf Hällströmin katu 2b)
FIN-00014 University of Helsinki
Finland

Telephone: +358-9-191 51479
Mobile: +358 50 599 0540
Fax:  +358-9-191 51400
WWW:  http://www.RNI.Helsinki.FI/~boh/
Journal of Negative Results - EEB: http://www.jnr-eeb.org

__
R-help@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