plot.popn | R Documentation |
Display animal locations from a popn
object.
## S3 method for class 'popn'
plot(x, add = FALSE, frame = TRUE,
circles = NULL, collapse = FALSE, seqcol = NULL, ...)
x |
object of class |
add |
logical to add points to an existing plot |
frame |
logical to add frame or polygon within which points were simulated |
circles |
vector giving the radii if circles are to be plotted |
collapse |
logical; if TRUE then multiple sessions are overlaid |
seqcol |
color used for first detection when collapse = TRUE (optional) |
... |
arguments passed to |
If circles
is provided then a circle of the given radius is
plotted for each animal using the symbols
function. The
arguments fg
and bg
may be used to control the colour of
the perimeter and the fill of each circle (see Examples).
For a multi-session popn with turnover
, collapse = TRUE
allows successive locations to be joined with (type = 'o'
or type = 'l'
).
seqcol
may be a single color, a vector of colours (one per session),
or a vector of two colours, one for the first and one for all later sessions
in which each animal was detected.
If ... includes 'col' then 'collapse' must be specified to avoid confusion, even for single-session data (see Examples).
popn
, sim.popn
temppopn <- sim.popn(D = 5, expand.grid(
x = c(0,100), y = c(0,100)))
# specify collapse to avoid partial match of col
plot(temppopn, pch = 16, collapse = FALSE, col = "blue")
plot(temppopn, circles = 20, bg = "tan", fg = "white")
plot(temppopn, pch = 16, cex = 0.5, add = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.