Given a table of quadrat counts for a spatial point pattern, plot the quadrats which were used, and display the quadrat count as text in the centre of each quadrat.
# S3 method for quadratcount
plot(x, ..., add = FALSE,
entries=as.integer(t(x)),
dx = 0, dy = 0, show.tiles = TRUE,
textargs = list())
Null.
Object of class "quadratcount"
produced by the function quadratcount
.
Additional arguments passed to plot.tess
to plot the quadrats.
Logical. Whether to add the graphics to an existing plot.
Vector of numbers to be plotted in each quadrat. The default is to plot the quadrat counts.
Horizontal and vertical displacement of text relative to centroid of quadrat.
Logical value indicating whether to plot the quadrats.
List containing extra arguments
passed to text.default
to control the annotation.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net
This is the plot method for the objects
of class "quadratcount"
that are
produced by the function quadratcount
.
Given a spatial point pattern, quadratcount
divides the observation window into disjoint tiles or quadrats,
counts the number of points in each quadrat, and stores the
result as a contingency table which also belongs to the
class "quadratcount"
.
First the quadrats are plotted
(provided show.tiles=TRUE
, the default).
This display can be controlled by passing additional arguments ...
to plot.tess
.
Then the quadrat counts are printed using
text.default
. This display can be controlled
using the arguments dx,dy
and textargs
.
If entries
is given, it should be a vector of length equal to
the number of quadrats (the number of tiles in the tessellation
as.tess(x)
) containing integer or character values
to be displayed in each quadrat, in the same sequence
as tiles(as.tess(x))
or tilenames(as.tess(x))
or the counts in the transposed table t(x)
.
quadratcount
,
plot.tess
,
text.default
,
plot.quadrattest
.
plot(quadratcount(swedishpines, 5))
Run the code above in your browser using DataLab