Learn R Programming

dr (version 1.0.2)

rotplot: draw many 2D projections of a 3D plot

Description

This function draws several 2D views of a 3D plot, sort of like a spinning plot.

Usage

rotplot(x, y, number=9, theta=seq(0, pi/2, length = 9), ...)

Arguments

x
a matrix with 2 columns giving the horizontal axes of the full 3D plot.
y
the vertical axis of the 3D plot.
number
Number of 2D views of the 3D plot.
theta
a list of rotation angles
...
additional arguments passed to coplot

Value

  • returns a graph object.

Details

For each value of theta, draw the plot of cos(theta)*x[,1]+sin(theta)*x[,2] versus y.

Examples

Run this code
data(ais)
 attach(ais)
 m1 <- dr(LBM ~ Ht + Wt + WCC) rotplot(dr.direction(m1,which=1:2),dr.y(m1),col=markby(Sex))

Run the code above in your browser using DataLab