Another option would be to define grid viewports and manually insert a colorkey with draw.colorkey. Based on the solution proposed by @rcs, the code will look something like this.
library(grid)
at <- seq(-1.1, 1.1, .01)
cols <- terrain.colors(350)
p <- levelplot(z ~ x + y, data = grid, at = at,
col.regions = cols, colorkey = FALSE,
xlab = list("Easting (m)", cex = .8),
ylab = list("Northing (m)", cex = .8))
png("~/plot.png", width = 8, height = 9, units = "cm", res = 150)
grid.newpage()
vp_fig <- viewport(x = 0, y = .1, width = 1, height = .9,
just = c("left", "bottom"))
pushViewport(vp_fig)
print(p, newpage = FALSE)
downViewport(trellis.vpname("figure"))
vp_key <- viewport(x = .5, y = -.4)
pushViewport(vp_key)
draw.colorkey(key = list(col = cols, at = at, width = .6, height = .6,
space = "bottom"), draw = TRUE)
dev.off()

source
share