lines3d: Adding text to a three dimensional plot

Description Usage Arguments Author(s) See Also Examples

Description

Adding text to a three dimensional plot previously created by plot3d() or persp().

Usage

1
2
3
4
## Default S3 method:
lines3d(x=seq(0, 1, len = nrow(z)), y=seq(0, 1, len = ncol(z)), z,
  persp.matrix=getOption("persp.matrix"), cex=NULL, col=par("col"), lty=NULL, lwd=NULL,
  ...)

Arguments

x

the coordinates of lines in the plot. Alternatively, a single plotting structure, function or any R object with a plot method can be provided.

y

the y coordinates of lines in the plot, optional if x is an appropriate structure.

z

the z coordinates of lines in the plot, optional if x is an appropriate structure.

persp.matrix

an 4-by-4 transformation matrix describing how to project the (x,y,z) lines to the drawing canvas as the one returned by persp()

. Default value is getOption("persp.matrix"), which is set by plot3d().

cex

the character expansion of the data lines.

col,lty,lwd

the colors, line types and the line widths of the lines.

...

further arguments accepted by lines.

Author(s)

Henrik Bengtsson

See Also

For creating a 3D plot see "plot3d". For adding points to a 3D plot see points3d(). For adding text labels to a 3D plot see text3d(). For adding polygons to a 3D plot see polygon3d(). For adding stems to a 3D plot see stem3d(). See also persp. Package scatterplot3d by Uwe Ligges. For detail about the graphical parameter arguments, see par.

Examples

1
2
3
4
5
6
7
8
9
omega <- seq(0, 6*pi, length.out=1000)
x <- sin(omega); y <- cos(omega)
col <- hsv(omega/max(omega), 1,1)
plot3d(x,y,omega, pch=176, col=col)
o1 <- seq(1, length(x)-10, by=10);
o2 <- o1 + 160;
o3 <- o1 + NA;
o <- as.vector(matrix(c(o1,o2,o3), nrow=3, byrow=TRUE))
lines3d(x[o],y[o],omega[o], col=col[o], lty=1:2)

HenrikBengtsson/R.basic documentation built on May 6, 2019, 11:51 p.m.