Learn R Programming

spatstat (version 1.20-2)

plot.psp: plot a Spatial Line Segment Pattern

Description

Plot a two-dimensional line segment pattern

Usage

## S3 method for class 'psp':
plot(x, \dots, add=FALSE)

Arguments

x
The line segment pattern to be plotted. An object of class "psp", or data which can be converted into this format by as.psp().
...
extra arguments that will be passed to the plotting functions segments (to plot the segments) and plot.owin (to plot the observation window).
add
Logical. If TRUE, the current plot is not erased; the segments are plotted on top of the current plot, and the window is not plotted.

Value

  • NULL

Details

This is the plot method for line segment pattern datasets (of class "psp", see psp.object). It plots both the observation window x$window and the line segments themselves. Plotting of the window x$window is performed by plot.owin. This plot may be modified through the ... arguments.

Plotting of the points themselves is performed by the standard R function segments. Its plotting behaviour may also be modified through the ... arguments.

See Also

psp.object, plot, par, plot.owin, symbols

Examples

Run this code
a <- psp(runif(20), runif(20), runif(20), runif(20), window=owin())
   plot(a)
   plot(a, main="My title")
   plot(a, col="blue")
   plot(a, lwd=3)

Run the code above in your browser using DataLab