3-D Wireframe Surface

USAGE:

wireframe(formula, at = pretty(z, cuts), col.regions, 
          colorkey = any(drape), cuts = 70, distance = 0.2, 
          drape = F, pretty = FALSE, 
          scales = list(cex = 0.5, distance = rep(1, 3), arrows = T), 
          ...) 

The following arguments have special meaning within this function. The common meanings for these and all other arguments are listed separately under trellis.args. This function also takes 3D arguments listed under trellis.3d.args.

ARGUMENTS:

formula
formula defining the 3-D surface and the grid over which the surface is defined. This is a formula of the form: z ~ x * y | g1 * g2 * ... where z is the surface value; x and y are the grid points where z was evaluated, and g1, g2 , etc. are optional given predictors, which may be numeric vectors, factors, or shingles. Missing values (NA) are allowed. Any z containing missing values will result in a "hole" in the wireframe surface.
at
values of z for the breaks between colored regions during color-draping. If at is omitted, it is computed based on the pretty flag: if pretty is TRUE, the default for at is pretty(z,cuts) ; if pretty is FALSE, the default is seq(min(z),max(z),length=cuts) .
col.regions
vector of color numbers used to color the different levels in wireframe color draping . By default, these values come from the trellis parameter list regions.
colorkey
a logical flag or a list of arguments to be passed to the color.key function. If colorkey is TRUE, a color key is placed in the right margin on each page. If colorkey is a list with a component named space, the color key will be placed on the appropriate side of the array of panels: "top", "bottom" , "left" , or "right" . See documentation for color.key for a full description of the other components of the colorkey= list.
cuts
gives the number of levels the range of z will be divided into for generating the at vector for color-draping.
drape
logical flag or a numeric vector of the same length as z in each panel. If TRUE, color draping will be done to the wireframe using the col.regions and at combination. If FALSE, no color draping will be performed. If drape is numeric vector (the same length as z ), color draping will be controlled by the value of drape instead of z.
pretty
logical, should the generated at vector be made up of pretty numbers (useful when labeling contours)?

VALUE:

an object of class trellis, which is automatically plotted by print.trellis.

SEE ALSO:

, , .

EXAMPLES:

attach(environmental) 
ozo.m <- loess((ozone^(1/3)) ~ wind * temperature * radiation, 
               parametric = c("radiation", "wind"), span = 1, degree = 2) 
w.marginal <- seq(min(wind), max(wind), length = 50) 
t.marginal <- seq(min(temperature), max(temperature), length = 50) 
r.marginal <- seq(min(radiation), max(radiation), length = 4) 
wtr.marginal <- list(wind = w.marginal, temperature = t.marginal, 
                     radiation = r.marginal) 
grid <- expand.grid(wtr.marginal) 
fit <- predict(ozo.m, grid) 
wireframe(fit ~ wind * temperature | radiation,  
          data = grid, scales = list(arrows = F), 
          xlab = "Wind Speed (mph)", 
          ylab = "Temperature (F)", 
          zlab = "Cube Root Ozone \n(cube root ppb)")