| panel.3dmisc {latticeExtra} | R Documentation |
Miscellanous panel functions for use with three dimensional Lattice functions such as cloud and wireframe
panel.3dbars(x, y, z,
rot.mat = diag(4), distance,
xbase = 1, ybase = 1,
xlim, xlim.scaled,
ylim, ylim.scaled,
zlim, zlim.scaled,
zero.scaled,
col = "black",
lty = 1, lwd = 1,
alpha,
...,
col.facet = "white",
alpha.facet = 1)
panel.3dpolygon(x, y, z, rot.mat = diag(4), distance,
xlim.scaled,
ylim.scaled,
zlim.scaled,
zero.scaled,
col = "white",
border = "black",
font, fontface,
...)
panel.3dtext(x, y, z, labels = seq_along(x),
rot.mat = diag(4), distance, ...)
x, y, z |
data to be plotted |
rot.mat, distance |
arguments controlling projection |
labels |
character or expression vectors to be uses as labels |
xlim, ylim, zlim |
limits in the original scale |
xlim.scaled, ylim.scaled, zlim.scaled |
limits after scaling |
zero.scaled |
the value of z = 0 after scaling |
xbase, ybase |
length of the sides of the bars (which are always centered on the
x and y values). Can not be vectorized.
|
col, lty, lwd, alpha, border |
graphical parameters |
font, fontface |
unused graphical parameters, present in the argument list only so that they can be captured and ignored |
col.facet, alpha.facet |
graphical parameters for sides of the bars |
... |
extra arguments, passed on as appropriate. |
panel.3dbars and panel.3dpolygon are both suitable for
use as (components of) the panel.3d.cloud argument of
panel.cloud. The first one produces three dimensional bars,
and the second one draws three dimensional polygons.
Deepayan Sarkar
panel.3dtext, panel.3dbars, panel.3dpolygon
dplot
library(lattice)
cloud(VADeaths, panel.3d.cloud = panel.3dbars,
col.facet = "grey", xbase = 0.4, ybase = 0.4,
screen = list(z = 40, x = -30))
cloud(as.table(prop.table(Titanic, margin = 1:3)[,,,2]),
type = c("p", "h"),
zlab = "Proportion\nSurvived",
panel.3d.cloud = panel.3dbars,
xbase = 0.4, ybase = 0.4,
aspect = c(1, 0.3),
scales = list(distance = 2),
panel.aspect = 0.5)
R version 2.9.0 (2009-04-17)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(latticeExtra)
> png(filename="images/panel.3dmisc_%03d.png" ,width=480, height=480)
> ### Name: panel.3dmisc
> ### Title: Miscellanous panel utilities for three dimensional Trellis
> ### Displays
> ### Aliases: panel.3dtext panel.3dbars panel.3dpolygon
> ### Keywords: dplot
>
> ### ** Examples
>
>
> library(lattice)
>
> cloud(VADeaths, panel.3d.cloud = panel.3dbars,
+ col.facet = "grey", xbase = 0.4, ybase = 0.4,
+ screen = list(z = 40, x = -30))
>
> cloud(as.table(prop.table(Titanic, margin = 1:3)[,,,2]),
+ type = c("p", "h"),
+ zlab = "Proportion\nSurvived",
+ panel.3d.cloud = panel.3dbars,
+ xbase = 0.4, ybase = 0.4,
+ aspect = c(1, 0.3),
+ scales = list(distance = 2),
+ panel.aspect = 0.5)
>
>
>
>
> dev.off()
null device
1
>