Learn R Programming

spatstat.linnet (version 3.2-2)

plot.lintess: Plot a Tessellation on a Linear Network

Description

Plot a tessellation or division of a linear network into tiles.

Usage

# S3 method for lintess
plot(x, ...,
        main, add = FALSE,
        style = c("colour", "width", "image"),
        col = NULL, values=marks(x),
        ribbon=TRUE, ribargs=list(), multiplot=TRUE, do.plot=TRUE)

Value

(Invisible) colour map.

Arguments

x

Tessellation on a linear network (object of class "lintess").

...

Arguments passed to segments (if style="segments") or to plot.im (if style="image") to control the plot.

main

Optional main title for the plot.

add

Logical value indicating whether the plot is to be added to an existing plot.

style

Character string (partially matched) specifying the type of plot. If style="colour" (the default), tiles are plotted using segments using colours to distinguish the different tiles or values. If style="width", tiles are plotted using segments using different segment widths to distinguish the different tiles or values. If style="image", the tessellation is converted to a pixel image and plotted by plot.im.

col

Vector of colours, or colour map, determining the colours used to plot the different tiles of the tessellation.

values

Values associated with each tile of the tessellation, used to determine the colours or widths. A vector with one entry for each tile, or a data frame with one row for each tile. The default is marks(x), or if that is null, then tilenames(x).

ribbon

Logical value specifying whether to print an explanatory legend for the colour map or width map.

ribargs

Arguments passed to plot.colourmap controlling the display of the colour map legend.

multiplot

Logical value determining what should happen if marks(x) has more than one column. If multiplot=TRUE (the default), several plot panels will be generated, one panel for each column of marks. If multiplot=FALSE, the first column of marks will be selected.

do.plot

Logical value specifying whether to actually generate the plot (do.plot=TRUE, the default) or just to compute the colour map and return it (do.plot=FALSE).

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

Details

A tessellation on a linear network L is a partition of the network into non-overlapping pieces (tiles). Each tile consists of one or more line segments which are subsets of the line segments making up the network. A tile can consist of several disjoint pieces.

This function plots the tessellation on the current device. It is a method for the generic plot.

If style="colour", each tile is plotted using segments, drawing segments of different colours.

If style="width", each tile is plotted using segments, drawing segments of different widths.

If style="image", the tessellation is converted to a pixel image, and plotted as a colour image using plot.im.

The colours or widths are determined by the values associated with each tile of the tessellation. If values is missing, the default is to use the marks of the tessellation, or if there are no marks, the names of the tiles.

See Also

lintess

Examples

Run this code
   X <- runiflpp(7, simplenet)
   Z <- divide.linnet(X)
   plot(Z, main="tessellation on network")
   points(as.ppp(X))
   plot(Z, main="tessellation on network",
           values=1:nobjects(Z), style="w")

Run the code above in your browser using DataLab