Learn R Programming

rockchalk (version 1.3.2)

perspEmpty: perspEmpty

Description

Creates a persp plot without drawing anything in the interior. Does equivalent of plot( type="n") for persp.

Usage

perspEmpty(x1, x2, y, x1lab, x2lab, ylab, ...)

Arguments

x1
data for the first horizontal axis, an R vector
x2
data for the second horizontal axis, an R vector
y
data for the vertical axis, an R vector
x1lab
label for the x1 axis, (the one called "xlab" inside persp)
x2lab
label for the x2 axis, (the one called "ylab" inside persp)
ylab
label for the y (vertical) axis (the one called "zlab" inside persp)
...
further arguments that are passed to persp. Note that persp options xlab, ylab, and zlab are ignored, because this function re-names them x1lab, x2lab, and ylab.

Details

Regression demonstrations require a blank slate in which points and planes can be drawn. This function creates that blank persp canvas for those projects. It is not necessary that x1, x2 and y be vectors of the same length, since this function's only purpose is to plot an empty box with ranges determined by the input variables. persp calls the 3 axes x, y, and z, but here they are called x1, x2, and y.

Examples

Run this code
x1 <- 1:10
x2 <- 40:50
y <-  rnorm(10)
perspEmpty(x1, x2, y)
perspEmpty(x1, x2, y, ticktype="detailed", nticks=10)

Run the code above in your browser using DataLab