plot.tess

0th

Percentile

Plot a Tessellation

Plots a tessellation, with optional labels for the tiles, and optional filled colour in each tile.

Keywords
hplot, spatial
Usage
# S3 method for tess
plot(x, …, main, add=FALSE,
                      show.all=!add,
                      border=NULL,
                      do.plot=TRUE,
                      do.labels=FALSE,
                      labels=tilenames(x), labelargs=list(),
                      do.col=FALSE,
                      values=marks(x), col=NULL, ribargs=list())
Arguments
x

Tessellation (object of class "tess") to be plotted.

Arguments controlling the appearance of the plot.

main

Heading for the plot. A character string.

add

Logical. Determines whether the tessellation plot is added to the existing plot.

show.all

Logical value indicating whether to plot everything including the main title and the observation window of x.

border

Colour of the tile boundaries. A character string or other value specifying a single colour. Ignored for pixel tessellations.

do.plot

Logical value indicating whether to actually perform the plot.

do.labels

Logical value indicating whether to show a text label for each tile of the tessellation.

labels

Character vector of labels for the tiles.

labelargs

List of arguments passed to text.default to control display of the text labels.

do.col

Logical value indicating whether tiles should be filled with colour. Always TRUE for pixel tessellations.

values

A vector of numerical values (or a factor, or vector of character strings) that will be associated with each tile of the tessellation and which determine the colour of the tile. The default is the marks of x. If the tessellation is not marked, or if the argument values=NULL is given, the default is a factor giving the tile identifier.

col

A vector of colours for each of the values, or a colourmap that maps these values to colours.

ribargs

List of additional arguments to control the plot of the colour map, if do.col=TRUE. See explanation in plot.im.

Details

This is a method for the generic plot function for the class "tess" of tessellations (see tess).

The arguments control the appearance of the plot. They are passed to segments, plot.owin or plot.im, depending on the type of tessellation.

Value

(Invisible) window of class "owin" specifying a bounding box for the plot, or an object of class "colourmap" specifying the colour map. (In the latter case, the bounding box information is available as an attribute, and can be extracted using as.owin.)

See Also

tess

Aliases
  • plot.tess
Examples
# NOT RUN {
  A <- tess(xgrid=0:4,ygrid=0:4)
  plot(A, border="blue", lwd=2, lty=2)
  plot(A, do.col=TRUE, values=runif(16), border="white")
  B <- A[c(1, 2, 5, 7, 9)]
  plot(B, hatch=TRUE)
  v <- as.im(function(x,y){factor(round(5 * (x^2 + y^2)))}, W=owin())
  levels(v) <- letters[seq(length(levels(v)))]
  E <- tess(image=v)
  plot(E)
  plot(E, col=rainbow(11), ribargs=list(las=1))
# }
Documentation reproduced from package spatstat, version 1.55-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.