spatstat (version 1.51-0)

plot.tess: Plot a tessellation

Description

Plots a tessellation.

Usage

# S3 method for tess
plot(x, ..., main, add=FALSE,
                      show.all=!add, col=NULL, do.plot=TRUE,
                      do.labels=FALSE,
                      labels=tilenames(x), labelargs=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.

col

Colour of the tile boundaries. A character string. 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.

Value

(Invisible) window of class "owin" specifying a bounding box for the plot (including a colour ribbon if plotted).

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.

See Also

tess

Examples

Run this code
# NOT RUN {
  A <- tess(xgrid=0:4,ygrid=0:4)
  plot(A, col="blue", lwd=2, lty=2)
  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)
# }

Run the code above in your browser using DataCamp Workspace