Hi all,

Here is a problem that seems to be rather old (see the ref at the end of
the message).

When I use the layout function to split the device into unequal parts then
plot a raster object, the layout is completely modified.

Here is a code to reproduce the problem.

library (raster)
 b<- brick(system.file("external/rlogo.grd", package="raster"))
 layout.matrix<-matrix(c(1,1,2,3,4,4),2,3,byrow=TRUE)
 layout(mat=layout.matrix)
 layout.show(4)
 plot(b[[1]])
 plot(b[[1]])
 plot(b[[1]])
 plot(b[[1]])
 plot(b[[1]])
 layout.show(4)

In fact the layout is modified as soon as the first plot of a raster
object.

 layout.matrix<-matrix(c(1,1,2,3,4,4),2,3,byrow=TRUE)
 layout(mat=layout.matrix)
 layout.show(4)
 plot(b[[1]])
 layout.show(4)

See also https://stat.ethz.ch/pipermail/r-help/2012-March/307114.html

My session Info !

R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=French_Canada.1252  LC_CTYPE=French_Canada.1252
[3] LC_MONETARY=French_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=French_Canada.1252

attached base packages:
[1] grDevices datasets  splines   graphics  stats     tcltk     utils
[8] methods   base

other attached packages:
[1] svSocket_0.9-54 TinnR_1.0-5     R2HTML_2.2      Hmisc_3.10-1
[5] survival_2.37-2

loaded via a namespace (and not attached):
[1] cluster_1.14.3  grid_2.15.2     lattice_0.20-13 svMisc_0.9-68
[5] tools_2.15.2

	[[alternative HTML version deleted]]

