Learn R Programming

pcds (version 0.1.2)

plot.Lines3D: Plot a Lines3D object

Description

Plots the line together with the defining vectors (i.e., the initial and direction vectors).

Usage

# S3 method for Lines3D
plot(x, xlab = "x", ylab = "y", zlab = "z", ...)

Arguments

x

Object of class Lines3D.

xlab, ylab, zlab

Titles for the \(x\), \(y\), and \(z\) axes, respectively (default is xlab="x", ylab="y" and zlab="z").

Additional parameters for plot.

Value

None

See Also

print.Lines3D, summary.Lines3D, and print.summary.Lines3D

Examples

Run this code
# NOT RUN {
A<-c(1,10,3); B<-c(1,1,3);
vecs<-rbind(A,B)
Line3D(A,B,.1)
Line3D(A,B,.1,dir.vec=FALSE)

tr<-range(vecs);
tf<-(tr[2]-tr[1])*.1 #how far to go at the lower and upper ends in the x-coordinate
tsq<-seq(-tf*10-tf,tf*10+tf,l=100)

lnAB3D<-Line3D(A,B,tsq)
lnAB3D
plot(lnAB3D)

# }

Run the code above in your browser using DataLab