Learn R Programming

spatstat.linnet (version 3.2-2)

plot.linnet: Plot a linear network

Description

Plots a linear network

Usage

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

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.

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 ....

Author

Ang Qi Wei aqw07398@hotmail.com and Adrian Baddeley Adrian.Baddeley@curtin.edu.au

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.

See Also

linnet

Examples

Run this code
   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)

Run the code above in your browser using DataLab