I am trying to get rid of the map fields generated by the 'maps' package in R. I get some of them by setting par(mar=c(0,0,0,0)) and using the border = 0 parameter in the map() function , But compared with, for example, the scattering diagram with mar=c(0,0,0,0) is still a lot of extra space. Here is some code to create an example map, as well as a regular scatter plot for comparison.
library(maps) x <- sample(360, 10)-180 y <- sample(160, 10)-80 x.boundary <- c(-180, 180, 0, 0) y.boundary <- c(0, 0, -80, 80) pdf("map.tmp.pdf", width=9, height=4) par(mar=rep(0,4)) map("world", border=0, ylim=c(-80, 80), fill=TRUE, bg="gray", col="white") points(x, y, pch=19, col="blue") points(x.boundary, y.boundary, pch=19, col="red") # map.axes() dev.off() pdf("scatter.tmp.pdf", width=9, height=4) par(mar=rep(0,4)) plot(x, y, xlim=c(-180, 180), ylim=c(-80, 80), pch=19, col="blue") points(x.boundary, y.boundary, pch=19, col="red") dev.off()
If you uncomment the map.axes() function, you can see that even if marginal values ββwere suppressed conditionally, space is reserved for the axes.
Any ideas that are highly valued have annoyed me for ages.