plot.trackvisits: Plots Visits from a Track with Locations

Description Usage Arguments Value See Also Examples

View source: R/plot.trackvisits.R

Description

plot.trackvisits is the plot function for objects of class trackvisits. Several plots are possible:

"lonlat"

Plots the longitude on the x axis and the latitude on the y axis. Vists are plotted as points and are linked by lines. Points of visits at campsites are filled black, points of visits at short-term visits are filled white. Lines linking visits are plotted solid if the duration between visits does not exceed certain threshold values. Otherwise, they are plotted dashed. Each visit is indicated by a label that contains the following information: (1) step: The id of the visit, (2) loc.: The id of the location, (3) visit: The number of repeated campsite visits at the same location, (4) arr.: The start time of the visit (irrespective whether this is sure or not), (5) dep.: The end time of the visit (irrespective whether this is sure or not). Label boxes are filled according to an argument "seasons}.} \item{\code{"lonlatanonymuous"}}{Like \code{"lonlat"}, but no labels will be added to the axes.} \item{\code{"altitude"}}{Plots the start time and end time of each visit on the x axis and the altitude of each visit on the y axis. Each visit is plotted as a pair of points linked by a solid straight line. Points of visits at campsites are filled black, points of visits at short-term visits are filled white. Lines linking visits are plotted solid if the duration between visits does not exceed certain threshold values. Otherwise, they are plotted dashed.Each visit is indicated by a label that contains the following information: (1) step: The id of the visit, (2) loc.: The id of the location, (3) visit: The number of repeated campsite visits at the same location, (4) arr.: The start time of the visit (irrespective whether this is sure or not), (5) dep.: The end time of the visit (irrespective whether this is sure or not). Label boxes are filled according to an argument \code{"seasons.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'trackvisits'
plot(
  x,
  ...,
  what = "lonlatanonymuous",
  seasons = data.frame(start = c(3, 5, 9, 11), end = c(4, 8, 10, 2), colour =
    c("yellow", "red", "burlywood1", "lightgray")),
  timethreshold = 0
)

Arguments

x

An object of class link{trackvisits} with the variable campsite being defined.

...

Further arguments, will be ignored.

what

A character value defining which plot to create. See the description section.

seasons

A data.frame object with a row for each season and three columns:

start

A numeric value indicating the start month of the respective season.

start

A numeric value indicating the end month of the respective season.

colour

A character value indicating the colour used in order to fill the label boxes of visits with arrivals within the respective seasons.

timethreshold

A numeric value representing a time threshold of duarions between adjacent visits [s]. If the duration between a visit and a next visit is larger than timethreshold, this will be shown as dashed line in the plot.

Value

A ggplot object

See Also

trackvisits, trackvisitsFromTrack, trackvisitsGetGroups, trackvisitsMergeGroups, trackvisitsSetNextvisitsamelocationindex, trackvisitsSetNorepeatedcampsitevisits.

Examples

1
#

henningte/herdersTA documentation built on Jan. 22, 2020, 5:16 a.m.