identify.tess: Interactively Identify Tiles of a Tessellation

View source: R/tess.R

identify.tessR Documentation

Interactively Identify Tiles of a Tessellation

Description

If a tessellation is plotted in the graphics window, then each time the left mouse button is pressed, this function will find the tile which contains the mouse position, and print its mark value (or its serial number if there is no mark).

Usage

  ## S3 method for class 'tess'
identify(x, ...,
                  labels=tilenames(x),
                  n=nobjects(x), plot=TRUE)

Arguments

x

A tessellation (object of class "tess").

...

Arguments passed to plot.owin and text.default controlling the graphical display.

labels

Labels associated with the tiles, to be plotted when the tiles are identified. A character vector or numeric vector of length equal to the number of tiles in x.

n

Maximum number of tiles to be identified.

plot

Logical. Whether to plot the labels when a tile is identified.

Details

This is a method for the generic function identify for tessellation objects.

The tessellation x should first be plotted using plot.tess. Then identify(x) reads the position of the graphics pointer each time the left mouse button is pressed. It then determines which tile of x contains the mouse position. The index of this tile (and its mark if any) will be returned as part of the value of the call.

Each time a tile is identified, the tile will be plotted in light blue fill colour, and text will be displayed inside the tile showing the name of the tile.

Value

A data.frame with columns id and name containing the serial numbers and names of the tiles of x that were identified, in the order that they were identified; If x is marked, subsequent columns contain the marks for these tiles.

Author(s)

\spatstatAuthors

.

See Also

identify, plot.tess


spatstat/spatstat.geom documentation built on June 14, 2025, 5:50 a.m.