Reputation: 59435
I have a problem getting rid of the box when plotting raster with colour scale:
require(raster)
data(volcano)
raster <- raster(volcano)
colfunc <- colorRampPalette(c("blue", "red"))
plot(raster, col = colfunc(40), breaks = seq(minValue(raster), maxValue(raster), length.out = 40), bty = "n", xaxt = "n", yaxt = "n")
the bty
option simply doesn't work. Am I missing something here?
Upvotes: 2
Views: 5226
Reputation: 59435
Got it:
plot(raster, ..., bty="n", box=FALSE)
It is interesting that both bty="n"
and box=FALSE
must be set! If you try only one of these, the box will be printed!
Upvotes: 5