Learn R Programming

generalCorr (version 1.2.0)

pillar3D: Create a 3D pillar chart to display (x, y, z) data coordinate surface.

Description

Give data on x, y, z coordinate values of a 3D surface, this function plots them after making pillars near each z value by adding and subtracting small amounts dz. Instead of pins of the height z this creates pillars which better resemble a surface. It uses the wireframe() function of `lattice' package to do the plotting.

Usage

pillar3D(
  z = c(657, 936, 1111, 1201),
  x = c(280, 542, 722, 1168),
  y = c(162, 214, 186, 246),
  drape = TRUE,
  xlab = "y",
  ylab = "x",
  zlab = "z",
  mymain = "Pillar Chart"
)

Arguments

z

z-coordinate values

x

x-coordinate values

y

y-coordinate values

drape

logical value, default drape=TRUE to give color to heights

xlab

default "x" label on the x axis

ylab

default "y" label on the y axis

zlab

default "z" label on the z axis

mymain

default "Pillar Chart" main label on the plot

Value

A 3D plot

Details

For additional plotting features type `pillar3D()' on the R console to get my code and adjust wireframe() function defaults.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
pillar3D())
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab