| cloud {lattice} | R Documentation |
Draw 3d scatter plots
cloud(formula,
data,
subpanel = "panel.xyplot",
aspect = c(1, 1),
scales = list(cex = 0.5, lty = 1, lwd = 1,
col = "black", distance = rep(1, 3),
arrows = TRUE),
zlab,
zlim = range(z),
distance = 0.2,
par.box,
perspective = TRUE,
R.mat = diag(4),
screen = list(z = 40, x = -60),
zoom = 1,
...)
formula |
a formula of the form z ~ x * y | g1 * g2 *
... |
data |
data frame in which variables are evaluated |
subpanel |
the function used to plot the points once coordinates
of their projections are computed. subpanel="panel.superpose"
along with the groups argument can be used to create grouped
displays. See iris example below |
aspect |
vector of length 2, giving the relative aspects of the y-size/x-size and z-size/x-size of the enclosing rectangle. |
scales |
describes scales. not used yet |
zlab |
z label |
zlim |
z limits |
distance |
between 0 and 1, controls amount of perspective. No connection with the physical concept of distance in this implementation (not clear what S+ does). individual values don't give the same results as S-Plus, but all instances should be achievable. |
par.box |
graphical parameters for box, not implemented yet |
perspective |
logical, whether to plot a perspective view |
R.mat |
initial rotation matrix (homogeneous coordinates). Not implemented. |
screen |
A list determining the rotations to applied to the data
before being plotted. The initial position starts with the view
somewhere in the positive z-axis, and the x and y axes in the usual
position. Each component of the list should be named one of x,
y, z, with their values indicating the amount of rotation about
that axis in degrees. |
zoom |
factor by which to scale the picture. |
... |
other arguments |
This function is by far incomplete, but is still included because of
the structure it puts into place. Conceptually, cloud itself is
almost complete (except for the R.mat argument), and once
proper panel functions are written, it and also wireframe
should be complete. That, however, is probably not going to happen
soon.
This and all other high level Trellis functions have several
arguments in common. These are extensively documented only in the
help page for xyplot, which should be consulted to learn more
detailed usage.
Deepayan Sarkar deepayan@stat.wisc.edu
data(iris)
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris,
groups = Species, screen = list(z = 20, x = -70),
subpanel = panel.superpose,
key = list(title = "Iris Data", x = .15, y=.85, corner = c(0,1),
border = TRUE,
points = Rows(trellis.par.get("superpose.symbol"), 1:3),
text = list(levels(iris$Species))))