Skip to content

bug in plotting rasterLayer?

1 message · Pascal Title

#
Hi,

I found that when I try to plot 3 rasters on top of each other, the third
raster plot causes the plot device coordinates to shift to the right.

I can reproduce this error easily:

library(raster)
f <- system.file("external/test.grd", package="raster")
r <- raster(f)

plot(r)

plot(r, add=TRUE)
plot(r, add=TRUE)
plot(r, add=TRUE)

For me, the 3rd plot with add=TRUE causes a coordinate system shift.

I am running R v3.3.3 with raster package v2.5-8.

Are others finding the same thing?