【发布时间】:2018-05-08 09:43:08
【问题描述】:
我正在尝试绘制法罗周围地区(仅海底)的测深地图。我正在使用格子和线框功能。所以我做了:
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)
)
但是,无法使 col.region 设置起作用。此外,我想将深度为 0 的区域涂成灰色。 所以基本上,两个问题:
- 为什么 col.region 参数不起作用(Manually defining the colours of a wireframe 似乎不起作用)
- 如何为某个特定的 z 制作颜色渐变并且具有特殊颜色(例如,对于 z = 0)?
非常感谢您的建议
夏洛特
【问题讨论】: