preSurface: Prepare for surface plot

View source: R/preSurface.R

preSurfaceR Documentation

Prepare for surface plot

Description

Selects the projection for a surface plot.

Usage

preSurface(x, y, z.surf, zaxis.log = FALSE, zaxis.range = c(NA, NA),
  yaxis.log = FALSE, yaxis.range = c(NA, NA), xaxis.log = FALSE,
  xaxis.range = c(NA, NA), xlabels = "Auto", ylabels = "Auto",
  zlabels = "Auto", phi = NA, theta = NA, batch = FALSE)

Arguments

x

the x-axis coordinate data, must be strictyly increasing. Missing values not permitted. May be of type Date.

y

the y-axis coordinate data, must be strictyly increasing. Missing values not permitted.

z.surf

a numeric matrix representing the surface. The length of x must match the number of rows in z.surf. The length of y must match the number of columns in z.surf.

zaxis.log

logical, if TRUE, then log-transform the z axis.

zaxis.range

set the range of the z-axis.

yaxis.log

logical, if TRUE, then log-transform the y axis.

yaxis.range

set the range of the y-axis.

xaxis.log

logical, if TRUE, then log-transform the x axis.

xaxis.range

set the range of the x-axis.

xlabels

set up x-axis labels.

ylabels

set up y-axis labels.

zlabels

set up z-axis labels.

phi

the viewing angle relative to the x-y plane. If NA, then programmatically select a reasonable angle. Should be greater than 0 and less than 90 degrees, but the best angles are generally between 20 and 45 degrees.

theta

the viewing angle relative to the x-axis. Positive values rotate the x-y plane in a clock-wise direction. If NA, then programmatically select a reasonable angle by putting the largest values of z.surf near the rear and the smallest values near the front. In general, the best angles are not multiples of 90 degrees.

batch

logical or character. If logical and TRUE, then select the viewing angles specified by phi and theta. If logical and FALSE, then draw 9 candidate combinations of viewing angles and pause for user input to select the desired viewing angles. If character, then select the viewing angles specified by the letter selection, must be A through I.

Value

A list containg the projection information and the data for plotting. Must be used in the call to surfacePlot

See Also

surfacePlot

Examples

## Not run: 
# See for examples of preSurface:
vignette(topic="GraphGallery", package="smwrGraphs")

## End(Not run)

USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.