plot_capthist: Plot a gibbonsecr capthist

Description Usage Arguments Details Author(s) See Also Examples

Description

Plotting methods for gibbonsecr capthist objects.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'gcapthist'
plot(x, which = c("traps", "arrays", "detections"),
  sessions = NULL, ...)

## S3 method for class 'gcapthist'
points(x, which = c("traps", "arrays", "detections"),
  sessions = NULL, ...)

geom_capthist(x, which = c("traps", "arrays"), sessions = NULL, ...)

Arguments

x

a gcapthist object

which

type of plot (see Details)

sessions

the sessions to plot (default is all sessions)

...

additional arguments to pass to plot.default, points.default or geom_point

Details

The following options are available for the which argument:

traps Listening post locations
arrays Centre points of listening post arrays
detections Arrows showing the estimated bearings, if present (with arrow length equal to to the estimated distance, if present)

Author(s)

Darren Kidney darrenkidney@googlemail.com

See Also

plot.gmask

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Not run: 

data(N.annamensis)
capthist = N.annamensis.capthist

# plot methods -----------------------------------------------------------------

# listening posts
plot(capthist)

# arrays
plot(capthist, "arrays")

# overlay
plot(capthist, "arrays", cex = 4, pch = 1)
points(capthist)
points(capthist, sessions = 1:3, col = "red", cex = 1)
points(capthist, "arrays", sessions = 4, col = 4, cex = 4, pch = 19)

# ggplot methods ---------------------------------------------------------------

library(ggplot2)

# listening posts
ggplot() + coord_fixed() +
    geom_capthist(capthist) +
    labs(x = "Longitude", y = "Latitude")

# arrays
ggplot() + coord_fixed() +
    geom_capthist(capthist, "arrays") +
    labs(x = "Longitude", y = "Latitude")

# overlay
ggplot() + coord_fixed() +
    geom_capthist(capthist) +
    geom_capthist(capthist, "arrays", pch = 1, cex = 9) +
    geom_capthist(capthist, sessions = 1:3, col = "red", cex = 1) +
    geom_capthist(capthist, "arrays", sessions = 4, col = 4, cex = 9, pch = 19) +
    labs(x = "Longitude", y = "Latitude")

## End(Not run)

dkidney/gibbonsecr documentation built on May 15, 2019, 9:11 a.m.