Learn R Programming

rockchalk (version 1.1)

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

Description

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.

Usage

perspEmpty(x1, x2, y, ... )

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
...
further arguments that are passed to persp

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