Learn R Programming

pcds (version 0.1.8)

plot.Lines: Plot a Lines object

Description

Plots the line together with the defining points.

Usage

# S3 method for Lines
plot(x, asp = NA, xlab = "x", ylab = "y", ...)

Value

None

Arguments

x

Object of class Lines.

asp

A numeric value, giving the aspect ratio for \(y\)-axis to \(x\)-axis \(y/x\) (default is NA), see the official help for asp by typing "? asp".

xlab, ylab

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

...

Additional parameters for plot.

See Also

print.Lines, summary.Lines, and print.summary.Lines

Examples

Run this code
# \donttest{
A<-c(-1.22,-2.33); B<-c(2.55,3.75)
xr<-range(A,B);
xf<-(xr[2]-xr[1])*.1
#how far to go at the lower and upper ends in the x-coordinate
x<-seq(xr[1]-xf,xr[2]+xf,l=3) #try also l=10, 20 or 100

lnAB<-Line(A,B,x)
lnAB
plot(lnAB)
# }

Run the code above in your browser using DataLab