I am trying to create a map of the bathymetry of the region around Faroe (only the sea bottom). I am using lattice and wireframe function. So I did:
depthfaroe <- getNOAA.bathy(lon1 = -11, lon2= -2, lat1 = 60, lat2 = 63, resolution = 1) %>%
fortify()
depthfaroeNeg <- depthfaroe
depthfaroeNeg$z[which(depthfaroeNeg$z > 0)] <- 0 #I remove the detail on the land
depthfaroe <- as.bathy(depthfaroeNeg)
wireframe(unclass(depthfaroe), shade = T, aspect = c(0.6, 0.1),
screen = list(z = 0, x = -20),
par.settings = list(axis.line=list(col="transparent")),
zoom = 1.5,
par.box=list(col=NA),
col.regions = colorRampPalette(c("blue", "pink"))(100)
)
However, impossible to make the col.region setting work. Moreover, I would like to color in grey the region with a depth of 0. So basically, two question:
- why the col.region parameter is not working (Manually defining the colours of a wireframe seems not to work)
- how to make a gradient of color AND for one particular z have a special color (e.g. for the z = 0)?
Thanks a lot in advance for your advise
Charlotte