Learn R Programming

spatstat.geom (version 3.6-0)

default.symbolmap.ppp: Default Symbol Map for Point Pattern

Description

Determines a symbol map for plotting the spatial point pattern x.

Usage

# S3 method for ppp
default.symbolmap(x, ...,
      chars = NULL, cols = NULL, 
      fixsize = FALSE,
      maxsize = NULL, meansize = NULL, markscale = NULL,
      minsize = NULL, zerosize = NULL, transform = NULL)

Arguments

Value

A symbol map (object of class "symbolmap") or a list of symbol maps, one for each column of marks.

Details

This algorithm determines a symbol map that can be used to represent the points of x graphically. It serves as the default symbol map for the plot method plot.ppp.

Users can modify the behaviour of plot.ppp by saving the symbol map produced by default.symbolmap.ppp, modifying the symbol map using update.symbolmap or other tools, and passing the modified symbol map to plot.ppp as the argument symap.

The default representation depends on the marks of the points, as follows.

unmarked point pattern:

If the point pattern does not have marks, then every point will be represented by the same plot symbol.

multitype point pattern:

If marks(x) is a factor, then each level of the factor is represented by a different plot character.

continuous marks:

If marks(x) is a numeric vector, each point is represented by a circle with diameter proportional to the mark (if the value is positive) or a square with side length proportional to the absolute value of the mark (if the value is negative).

other kinds of marks:

If marks(x) is neither numeric nor a factor, then each possible mark will be represented by a different plotting character. The default is to represent the \(i\)th smallest mark value by points(..., pch=i).

The following arguments can be used to modify how the points are plotted:

  • If fixsize=TRUE, or if the graphics parameter size is given and is a single value, then numerical marks will be rendered as symbols of the same physical size

  • The argument chars determines the plotting character or characters used to display the points (in all cases except for the case of continuous marks). For an unmarked point pattern, this should be a single integer or character determining a plotting character (see par("pch")). For a multitype point pattern, chars should be a vector of integers or characters, of the same length as levels(marks(x)), and then the \(i\)th level or type will be plotted using character chars[i].

  • If chars is absent, but there is an extra argument pch, then this will determine the plotting character for all points.

  • The argument cols determines the colour or colours used to display the points. For an unmarked point pattern, cols should be a character string determining a colour. For a multitype point pattern, cols should be a character vector, of the same length as levels(marks(x)): that is, there is one colour for each possible mark value. The \(i\)th level or type will be plotted using colour cols[i]. For a point pattern with continuous marks, cols can be either a character string or a character vector specifying colour values: the range of mark values will be mapped to the specified colours. Alternatively, for any kind of data, cols can be a colour map (object of class "colourmap") created by colourmap.

  • If cols is absent, the colours used to plot the points may be determined by the extra arguments fg and bg for foreground (edge) and background (fill) colours. (These parameters are not recommended for plotting multitype point patterns, due to quirks of the graphics system.)

  • The default colour for the points is a semi-transparent grey, if this is supported by the plot device. This behaviour can be suppressed (so that the default colour is non-transparent) by setting spatstat.options(transparent=FALSE).

  • The arguments maxsize, meansize and markscale are incompatible with each other (and incompatible with symap). The arguments minsize and zerosize are incompatible with each other (and incompatible with symap). Together, these arguments control the physical size of the circles and squares which represent the marks in a point pattern with continuous marks. The size of a circle is defined as its diameter; the size of a square is its side length. If markscale is given, then a mark value of m is plotted as a circle of diameter m * markscale + zerosize (if m is positive) or a square of side abs(m) * markscale + zerosize (if m is negative). If maxsize is given, then the largest mark in absolute value, mmax=max(abs(marks(x))), will be scaled to have physical size maxsize. If meansize is given, then the average absolute mark value, mmean=mean(abs(marks(x))), will be scaled to have physical size meansize. If minsize is given, then the minimum mark value, mmean=mean(abs(marks(x))), will be scaled to have physical size minsize.

  • The user can set the default values of these plotting parameters using spatstat.options("par.points").

Additionally the user can specify any of the graphics parameters recognised by symbolmap, including shape, size, pch, cex, cols, col, fg, bg, lwd, lty, etch, direction,headlength,headangle,arrowtype.

See Also

plot.ppp

default.symbolmap

symbolmap

Examples

Run this code
  default.symbolmap(longleaf)
  default.symbolmap(lansing)

Run the code above in your browser using DataLab