Learn R Programming

RSurvey (version 0.9.3)

Plot3d: Plot Points and Surface in 3D

Description

This function renders raster and point data in three-dimensional (3D) space.

Usage

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)

Arguments

r

RasterLayer. Gridded surface data

p

SpatialPointsDataFrame. Spatial point data

xlim

numeric. Vector of length 2 giving the minimum and maximum values for the x-axis.

ylim

numeric. Vector of length 2 giving the minimum and maximum values for the y-axis.

zlim

numeric. Vector of length 2 giving the minimum and maximum values for the z-axis.

vasp

numeric. The z/x aspect ratio for spatial axes.

hasp

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,

cex.pts

numeric. Amount by which point symbols should be magnified relative to the default.

n

integer. Number of contour levels desired.

color.palette

function. Color palette to be used to assign colors in the plot.

maxpixels

integer. Maximum number of cells to use for the plot.

Value

Used for the side-effect of a new plot generated.

Details

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.

See Also

matplot, boxplot

Examples

Run this code
# NOT RUN {
  Plot3d()
  rgl::rgl.quit()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab