Learn R Programming

RSurvey (version 0.5.0)

plotSurvey3d: Plot Interpolated Surface using OpenGL

Description

A three-dimensional (3D) surface plot of the processed survey data is drawn.

Usage

plotSurvey3d(x=NULL, y=NULL, z=NULL, px=NULL, py=NULL, pz=NULL, 
vasp = NA, hasp = NA, width = 7, ppi = 96, cex.pts=1, 
mouseMode = c("trackball", "zAxis", "zoom"), bg = "white")

Arguments

x, y
numeric; locations of grid lines at which the values in z are measured. These must be in ascending order. If x is a list, its components x$x and x$y are used for x and y, respectively. If th
z
matrix; the values to be plotted.
px
numeric; a vector of x coordinates for points in the plot. If px is a list, its components px$px, px$py and px$pz are used for px, py and pz, respectiv
py
numeric; a vector of y coordinates for points in the plot
pz
numeric; a vector of z coordinates for points in the plot
vasp
numeric; the z/x aspect ratio
hasp
numeric; the y/x aspect ratio
width
numeric; the width of the plotting window canvas in inches
ppi
integer; screen resolution in points per inch
cex.pts
numeric; the amount by which point symbols should be magnified relative to the default.
mouseMode
character; a vector of 3 strings describing what the 3 mouse buttons do, see par3d
bg
character; the primary color for the background

Details

The interpolated surface data is rendered using rgl, a 3D visualization device system for Rbased 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

surface3d, points3d

Examples

Run this code
data(project)
d <- srvy.dat("data.grd")
plotSurvey3d(d)
rgl.quit()

Run the code above in your browser using DataLab