plot.spp {ads} | R Documentation |
Plot a Spatial Point Pattern object
Description
Plot a Spatial Point Pattern object returned by function spp
.
Usage
## S3 method for class 'spp'
plot(x, main, out=FALSE, use.marks=TRUE, cols, chars, cols.out, chars.out,
maxsize, scale=TRUE, add=FALSE, legend=TRUE, csize=1, ...)
Arguments
x |
an object of class |
main |
by default, the value of argument |
out |
by default |
use.marks |
by default |
cols |
(optional) the colour(s) used to plot points located inside the sampling window (see Details). |
chars |
(optional) plotting character(s) used to plot points located inside the sampling window (see Details). |
cols.out |
(optional) if |
chars.out |
(optional) if |
maxsize |
(optional) maximum size of plotting symbols. By default |
csize |
scaling factor for font size so that actual font size is |
scale |
If |
legend |
If |
add |
by default |
... |
extra arguments that will be passed to the plotting functions |
Details
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 ifuse.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 (argumentchars = "circles"
, the default) or squares (argumentchars = "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"
.
Value
none.
Author(s)
See Also
Examples
data(BPoirier)
BP<-BPoirier
## Not run: a univariate point pattern in a rectangle sampling window
plot(spp(BP$trees, win=BP$rect))
## Not run: a univariate point pattern in a circular sampling window
plot(spp(BP$trees, win=c(55,45,45)), out=TRUE, scale=TRUE)
## Not run: a univariate point pattern in a complex sampling window
## Not run: (points outside the sampling window displayed in red colour)
plot(spp(BP$trees, win=BP$rect, tri=BP$tri1), out=TRUE)
## Not run: a multivariate point pattern in a rectangle sampling window
plot(spp(BP$trees, win=BP$rect, marks=BP$species))
## Not run: a multivariate point pattern in a circular sampling window
## Not run: (points inside/outside the sampling window displayed in blue colour/as red crosses)
plot(spp(BP$trees, win=c(55,45,45), marks=BP$species), out=TRUE, cols=c("blue","blue","blue"),
chars.out=c("+","+","+"), cols.out=c("red","red","red"))
## Not run: a marked point pattern in a rectangle sampling window with circles in green colour
plot(spp(BP$trees, win=BP$rect, marks=BP$dbh), cols="green")
## Not run: a marked point pattern in a circular sampling window
## Not run: (squares in red colour inside and circles in blue colour outside)
plot(spp(BP$trees, win=c(55,45,45), marks=BP$dbh), out=TRUE, chars="squares",
cols="red", cols.out="blue")