#Plotting the Monterey Bay dataset with bathymetry data
if(run_documentation()) {
water_palette = colorRampPalette(c("darkblue", "dodgerblue", "lightblue"))(200)
bathy_hs = height_shade(montereybay, texture = water_palette)
#For compass text
par(family = "Arial")
#Set everything below 0m to water palette
montereybay |>
sphere_shade(zscale=10) |>
add_overlay(generate_altitude_overlay(bathy_hs, montereybay, 0, 0)) |>
add_shadow(ray_shade(montereybay,zscale=50),0.3) |>
plot_map()
}
Run the code above in your browser using DataLab