This function renders raster and point data in three-dimensional (3D) space.
Plot3d(r = NULL, p = NULL, xlim = NULL, ylim = NULL, zlim = NULL,
vasp = NULL, hasp = NULL, cex.pts = 1, n = NULL,
color.palette = grDevices::terrain.colors, maxpixels = 5e+05)
RasterLayer. Gridded surface data
SpatialPointsDataFrame. Spatial point data
numeric. Vector of length 2 giving the minimum and maximum values for the x-axis.
numeric. Vector of length 2 giving the minimum and maximum values for the y-axis.
numeric. Vector of length 2 giving the minimum and maximum values for the z-axis.
numeric. The z/x aspect ratio for spatial axes.
numeric.
The y/x aspect ratio for spatial axes.
Defaults to 1 (one unit on the x-axis equals one unit on the y-axis) when r
is projected,
numeric. Amount by which point symbols should be magnified relative to the default.
integer. Number of contour levels desired.
function. Color palette to be used to assign colors in the plot.
integer. Maximum number of cells to use for the plot.
Used for the side-effect of a new plot generated.
The interpolated surface is rendered using rgl, a 3D visualization device system for R based on OpenGL. The mouse is used for interactive viewpoint navigation where the left, right, and center mouse buttons rotate the scene, rotate the scene around the x-axis, and zooms the display, respectively.
# NOT RUN {
Plot3d()
rgl::rgl.quit()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab