[Rd] split.screen problem with jpeg/png device (PR#6223)

steve_koehler at securecomputing.com steve_koehler at securecomputing.com
Tue Dec 30 16:37:24 MET 2003


Full_Name: Steve Koehler
Version: 1.8.1
OS: Solaris and Windows
Submission from: (NULL) (192.55.214.50)


In the following program, if output is sent to X11, you get all four graphs,
but if output is sent to .jpeg, you only get the C and D graphs.  A workaround
is to do all the screen splitting at the top, before using any screens.  This
also
fails with .png output.

jpeg ("test.jpeg")
#x11()

a <- split.screen (c(2, 1))

screen (a[1])
  b <- split.screen (c(1, 2))
  screen (b[1])
  plot (1:10, main="a")
  screen (b[2])
  plot (1:10, main="b")

screen (a[2])
  d <- split.screen (c(1, 2))
  screen (d[1])
  plot (1:10, main="c")
  screen (d[2])
  plot (1:10, main="d")

close.screen (all=TRUE)

dev.off()



More information about the R-devel mailing list