Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

text.ppp

Add Text Labels to Spatial Pattern


Description

Plots a text label at the location of each point in a spatial point pattern, or each object in a spatial pattern of objects.

Usage

## S3 method for class 'ppp'
text(x, ...)


## S3 method for class 'psp'
text(x, ...)

Arguments

x

A spatial point pattern (object of class "ppp"), or a spatial pattern of line segments (class "psp").

...

Additional arguments passed to text.default.

Details

These functions are methods for the generic text. A text label is added to the existing plot, at the location of each point in the point pattern x, or near the location of the midpoint of each segment in the segment pattern x.

Additional arguments ... are passed to text.default and may be used to control the placement of the labels relative to the point locations, and the size and colour of the labels.

By default, the labels are the serial numbers 1 to n, where n is the number of points or segments in x. This can be changed by specifying the argument labels, which should be a vector of length n.

Value

Null.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

plot(cells)
  text(cells, pos=2)

  plot(Frame(cells))
  text(cells, cex=1.5)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.