I am trying to use levelplot
to plot a simple Digital Elevation Model (DEM).
Here is my code:
r1 = raster("ned10dem.tif")
e = extent(460000,480000,4555000,4567500)
rr1 = crop(r1,e)
p = levelplot(rr1, scales=list(x=list(at=seq(450000,480000,4000))),
margin=F, cuts=200,
col.regions = terrain.colors(350,alpha=1),
colorkey=list(space="bottom"),
xlab="Easting(m)", ylab="Northing(m)")
plot(p)
The plot ends up looking like this:
What I cannot figure out is how to increase the space between the colorkey and the x-axis such that the colorkey does not cover the x-axis label.