[Rd] cascade option for dev.new?

From: John Nolan <jpnolan_at_american.edu>
Date: Wed, 04 Nov 2009 10:32:27 -0500

I frequently run scripts that generate multiple graphs. Unless you specify a specific window location, dev.new superimposes all new graphics windows exactly on top of each other. It would be nice to have a "cascade=TRUE" option in dev.new to prevent windows from being hidden. A hasty approximation to this is the following function:

# utility function to prevent overlapping plot windows cascade <- function( k=dev.cur(),x0=300,y0=50,dx=30,dy=30){   dev.new( xpos=x0+k*dx, ypos=y0+k*dy);   invisible() }

x <- seq(-10,10,.1); y <- sin(x)
plot(x,y,type='l',main='first plot')
cascade()
plot(x,y,type='l',main='second plot')

John Nolan
Math/Stat Dept.
American University  



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 04 Nov 2009 - 15:35:00 GMT

This archive was generated by hypermail 2.2.0 : Fri 06 Nov 2009 - 16:50:21 GMT