Plot a Spatial Point Pattern object returned by function spp
.
# S3 method for spp
plot(x, main, out=FALSE, use.marks=TRUE, cols, chars, cols.out, chars.out,
maxsize, scale=TRUE, add=FALSE, legend=TRUE, csize=1, ...)
none.
an object of class "spp"
(see spp
).
by default, the value of argument x
, otherwise a text to be displayed as a title of the plot.main=NULL
displays no title.
by default out = FALSE
. If TRUE
points of the pattern located outside the sampling window are plotted.
by default use.marks = TRUE
. If FALSE
different symbols are not used for each mark of multivariate
or marked point patterns, so that they are plotted as univariate (see spp
).
(optional) the colour(s) used to plot points located inside the sampling window (see Details).
(optional) plotting character(s) used to plot points located inside the sampling window (see Details).
(optional) if out = TRUE
, the colour(s) used to plot points located outside the sampling window (see Details).
(optional) if out = TRUE
, plotting character(s) used to plot points located outside the sampling window (see Details).
(optional) maximum size of plotting symbols. By default maxsize
is automatically adjusted to plot size.
scaling factor for font size so that actual font size is par("cex")*csize
. By default csize = 1
.
If scale = TRUE
(the default) graduations giving plot size are displayed.
If legend = TRUE
(the default) a legend for plot symbols is displayed (multivariate and marked types only).
by default add = FALSE
. If TRUE
a new window is not created and just the points are plotted over the existing plot.
extra arguments that will be passed to the plotting functions plot.default
, points
and/or symbols
.
The sampling window x$window
is plotted first, through a call to function plot.swin
.
Then the points themselves are plotted, in a fashion that depends on the type of spatial point pattern (see spp
).
univariate pattern:
if x$type = c("univariate")
, i.e. the point pattern does not have marks, or if use.marks = FALSE
, then the locations of all
points is plotted using a single plot character.
multivariate pattern:
if x$type = c("multivariate")
, i.e. the marks are levels of a factor, then each level is represented by a different plot character.
marked pattern:
if x$type = c("marked")
, i.e. the marks are real numbers, then points are represented by circles (argument chars = "circles"
, the default) or squares
(argument chars = "squares"
) proportional to their marks' value (positive values are filled, while negative values are unfilled).
Arguments cols
and cols.out
(if out = TRUE
) determine the colour(s) used to display the points located inside and outside the sampling window, respectively.
Colours may be specified as codes or colour names (see par("col")
). For univariate and marked point patterns, cols
and cols.out
are single character strings, while
for multivariate point patterns they are character vectors of same length as levels(x$marks)
and levels(x$marksout)
, respectively.
Arguments chars
and chars.out
(if out = TRUE
) determine the symbol(s) used to display the points located inside and outside the sampling window, respectively.
Symbols may be specified as codes or character strings (see par("pch")
). For univariate point patterns, chars
and chars.out
are single character strings, while
for multivariate point patterns they are character vectors of same length as levels(x$marks)
and levels(x$marksout)
, respectively. For marked point patterns,
chars
and chars.out
can only take the value "circles"
or "squares"
.
spp
,
swin
,
plot.swin
.