I'm trying to plot 6 rgb images with `raster::plotRGB` and I have a problem adjusting the margins. It seems by default, `plotRGB` overwrites every `par(mar)` settings that we called before. My goal is to have a 3\*2 symetrical graph panel.

```
library(raster)
par.default <- par(no.readonly=T)

png("c:\\temp\\img_plotRGB.png", width=6, height=9,unit="in", res=300)
par(mfrow=c(3,2), oma=c(1,1,1,1), mar=c(1,1,1,1))
for(i in 1:6){
  r <- g <- b <- raster(ncol=10, nrow=10, res=1, crs=CRS("+init=EPSG:32198"), ext=extent(c(0,10,0,10)))
  values(r) <- runif(ncell(r))
  values(g) <- runif(ncell(r))
  values(b) <- runif(ncell(r))
  rgb = rgb<-stack(r*255,g*255,b*255)
  plotRGB(rgb)
}
par(par.default)
dev.off()

```

gives that: [![enter image description here](https://i.stack.imgur.com/0ITT1.png)](https://i.stack.imgur.com/0ITT1.png)

You can see there are no separation between two graphs on the same line even if `par(mar=c(1,1,1,1)` is set.

If I add the setting `axes=TRUE`to `plotRGB` I get the layout I want, but with axis I do not want :

```
png("c:\\temp\\img_plotRGB_axes.png", width=6, height=9,unit="in", res=300)
par(mfrow=c(3,2), oma=c(1,1,1,1), mar=c(1,1,1,1))
for(i in 1:6){
  r <- g <- b <- raster(ncol=10, nrow=10, res=1, crs=CRS("+init=EPSG:32198"), ext=extent(c(0,10,0,10)))
  values(r) <- runif(ncell(r))
  values(g) <- runif(ncell(r))
  values(b) <- runif(ncell(r))
  rgb = rgb<-stack(r*255,g*255,b*255)
  plotRGB(rgb, axes=TRUE)
}
par(par.default)
dev.off()

```

[![enter image description here](https://i.stack.imgur.com/m7qx5.png)](https://i.stack.imgur.com/m7qx5.png)

Any idea how to get the first graph with spacing or the second graph without the axis written?