# NOT RUN {
#Plotting a spherical texture map of the built-in `montereybay` dataset.
# }
# NOT RUN {
montereybay %>%
sphere_shade(texture="desert") %>%
plot_3d(montereybay,zscale=50)
render_snapshot(clear = TRUE)
# }
# NOT RUN {
#With a water layer
# }
# NOT RUN {
montereybay %>%
sphere_shade(texture="imhof2") %>%
plot_3d(montereybay, zscale=50, water = TRUE, watercolor="imhof2",
waterlinecolor="white", waterlinealpha=0.5)
render_snapshot(clear = TRUE)
# }
# NOT RUN {
#We can also change the base by setting "baseshape" to "hex" or "circle"
# }
# NOT RUN {
montereybay %>%
sphere_shade(texture="imhof1") %>%
plot_3d(montereybay, zscale=50, water = TRUE, watercolor="imhof1", theta=-45, zoom=0.7,
waterlinecolor="white", waterlinealpha=0.5,baseshape="circle")
render_snapshot(clear = TRUE)
# }
# NOT RUN {
# }
# NOT RUN {
montereybay %>%
sphere_shade(texture="imhof1") %>%
plot_3d(montereybay, zscale=50, water = TRUE, watercolor="imhof1", theta=-45, zoom=0.7,
waterlinecolor="white", waterlinealpha=0.5,baseshape="hex")
render_snapshot(clear = TRUE)
# }
# NOT RUN {
#Or we can carve out the region of interest ourselves, by setting those entries to NA
#to the elevation map passed into `plot_3d`
#Here, we only include the deep bathymetry data by setting all points greater than -10
#in the copied elevation matrix to NA.
mb_water = montereybay
mb_water[mb_water > -10] = NA
# }
# NOT RUN {
montereybay %>%
sphere_shade(texture="imhof1") %>%
plot_3d(mb_water, zscale=50, water = TRUE, watercolor="imhof1", theta=-45,
waterlinecolor="white", waterlinealpha=0.5)
render_snapshot(clear = TRUE)
# }
Run the code above in your browser using DataLab