default.symbolmap.ppp {spatstat.geom} | R Documentation |
Default Symbol Map for Point Pattern
Description
Determines a symbol map for plotting the spatial point pattern x
.
Usage
## S3 method for class 'ppp'
default.symbolmap(x, ...,
chars = NULL, cols = NULL,
fixsize = FALSE,
maxsize = NULL, meansize = NULL, markscale = NULL,
minsize = NULL, zerosize = NULL, marktransform = NULL)
Arguments
x |
A spatial point pattern (object of class |
... |
extra graphical parameters, passed to |
chars |
the plotting character(s) used to plot points.
Either a single character, an integer,
or a vector of single characters or integers.
Ignored if |
cols |
the colour(s) used to plot points.
Either an integer index from 1 to 8 (indexing the standard colour
palette), a character string giving the name of a colour,
or a string giving the hexadecimal representation of a colour,
or a vector of such integers or strings.
See the section on Colour Specification
in the help for |
fixsize |
Logical value specifying whether the symbols should all have the
same physical size on the plot. Default is |
maxsize |
Maximum physical size of the circles/squares plotted
when |
meansize |
Average physical size of the circles/squares plotted
when |
markscale |
physical scale factor determining the sizes of the
circles/squares plotted when |
minsize |
Minimum physical size of the circles/squares plotted
when |
zerosize |
Physical size of the circle/square representing a mark value of zero,
when |
marktransform |
Experimental. A function that should be applied to the mark values before the symbol mapping is applied. |
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
,
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 thei
th smallest mark value bypoints(..., pch=i)
.
The following arguments can be used to modify how the points are plotted:
-
If
fixsize=TRUE
, or if the graphics parametersize
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 (seepar("pch")
). For a multitype point pattern,chars
should be a vector of integers or characters, of the same length aslevels(marks(x))
, and then thei
th level or type will be plotted using characterchars[i]
. -
If
chars
is absent, but there is an extra argumentpch
, 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 aslevels(marks(x))
: that is, there is one colour for each possible mark value. Thei
th level or type will be plotted using colourcols[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 bycolourmap
. -
If
cols
is absent, the colours used to plot the points may be determined by the extra argumentsfg
andbg
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
andmarkscale
are incompatible with each other (and incompatible withsymap
). The argumentsminsize
andzerosize
are incompatible with each other (and incompatible withsymap
). 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. Ifmarkscale
is given, then a mark value ofm
is plotted as a circle of diameterm * markscale + zerosize
(ifm
is positive) or a square of sideabs(m) * markscale + zerosize
(ifm
is negative). Ifmaxsize
is given, then the largest mark in absolute value,mmax=max(abs(marks(x)))
, will be scaled to have physical sizemaxsize
. Ifmeansize
is given, then the average absolute mark value,mmean=mean(abs(marks(x)))
, will be scaled to have physical sizemeansize
. Ifminsize
is given, then the minimum mark value,mmean=mean(abs(marks(x)))
, will be scaled to have physical sizeminsize
. -
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
.
Value
A symbol map (object of class "symbolmap"
)
or a list of symbol maps, one for each column of marks.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au
See Also
Examples
default.symbolmap(longleaf)
default.symbolmap(lansing)