plot.linnet: Plot a linear network

View source: R/linnet.R

plot.linnetR Documentation

Plot a linear network

Description

Plots a linear network

Usage

 ## S3 method for class 'linnet'
plot(x, ..., main=NULL, add=FALSE, 
                               do.plot=TRUE,
                               show.vertices=FALSE, show.window=FALSE,
                               args.vertices=list(), args.segments=list())

Arguments

x

Linear network (object of class "linnet").

...

Graphics arguments passed to plot.psp and plot.ppp.

main

Main title for plot. Use main="" to suppress it.

add

Logical. If TRUE, superimpose the graphics over the current plot. If FALSE, generate a new plot.

do.plot

Logical value specifying whether to actually perform the plot.

show.vertices

Logical value specifying whether to plot the vertices as well.

show.window

Logical value specifying whether to plot the window containing the linear network.

args.segments

Optional list of arguments passed to plot.psp when plotting the line segments of the network. These arguments override any arguments in ....

args.vertices

Optional list of arguments passed to plot.ppp when plotting the vertices of the network (only when vertices=TRUE). These arguments override any arguments in ....

Details

This is the plot method for class "linnet".

The line segments of the network x are plotted using plot.psp. If show.vertices=TRUE, the vertices of the network will also be plotted, using plot.ppp. If show.window=TRUE, the window surrounding the network will also be plotted.

If the vertices or line segments of x are marked, the marks are not displayed by default. To plot the marks, set use.marks=TRUE. To plot the marks and plot the associated legends, set use.marks=TRUE, legend=TRUE. To plot only the marks of the segments and not the marks of the vertices, set args.segments=list(use.marks=TRUE) and so on.

Value

An (invisible) list with two elements, segments and vertices describing the representation of the marks. The element segments contains the result of plot.psp (either a colourmap, a numeric value or an owin). The element vertices contains the result of plot.ppp (a symbolmap) or NULL.

The result also has attribute "bbox" giving the bounding box for the plot.

Author(s)

\wei

and \adrian

See Also

linnet

Examples

   plot(simplenet)

   L <- simplenet
   marks(L, "vertices") <- letters[1:nvertices(L)]
   marks(L, "segments") <- runif(nsegments(L))
   plot(L, show.vertices=TRUE, use.marks=TRUE, legend=TRUE)

spatstat.linnet documentation built on Nov. 2, 2023, 6:10 p.m.