Благодаря пакету developper я нашел ответ:
ramp.fun <- colorRamp(c("darkblue", "cadetblue1", "burlywood4"))
custom.palette <- function(irr, ref, height, rampfun = ramp.fun)
{if(height != 1) {
## convert height to color using rampfun and map to HSV space
h.hsv <- rgb2hsv(t(rampfun(height)))
## reduce 'V' (brightness): multiply by irradiance
toReturn <- hsv(h = h.hsv["h",],
s = h.hsv["s",],
v = irr * h.hsv["v",])
} else {
toReturn <- "grey"
}
return(toReturn)
}
xlim <- c(-35, 10)
ylim <- c(55, 70)
m <- map_data("worldHires", xlim = xlim, ylim = ylim)
depth <- getNOAA.bathy(lon1 = xlim[1], lon2= xlim[2], lat1 = ylim[2], lat2 = ylim[1], resolution = 2) %>%
fortify()
depthNeg <- depth
depthNeg$z[which(depthNeg$z > 0)] <- 0
depth <- as.bathy(depthNeg)
wireframe(unclass(depth), 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='transparent',
shade.colors.palette = custom.palette
)
Надеюсь, это поможет:)
ура!
Ч