Detailed description |
Hello. When plotting a raster with a @legend@colortable, an empty plot is produced before the main plot appears.
The following produces a single plot, in the left pane
myraster = raster(matrix(rep(1:4, 4), 4))
par(mfrow=c(1,2))
plot(myraster)
whereas the code below produces an empty plot in the left pane before putting the desired plot in the right pane
myraster@legend@colortable = rainbow(5)
par(mfrow=c(1,2))
plot(myraster)
changing the useRaster option doesn't help. I'm using
Package raster version 2.1-49, R 3.0.2
A way around this problem is to do
plot(extent(myraster), asp=TRUE)
plot(myraster, add=TRUE)
|
|