plot.hoops: Plots the trajectory with sites of interest and other hoops

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/plot.hoops.R

Description

Plots the trajectory of the animal with the different hoops (sites of interest, removed circles and other circles) overlaid.

Usage

1
2
3
## S3 method for class 'hoops'
plot(x, y, Name, R, first = 'n', colours = c('orange','darkgreen','red'), 
lwds = c(2,2,2), number_sites=-1, ...)

Arguments

x

array of the x-coordinates describing the trajectory

y

array of the y-coordinates describing the trajectory

Name

name of the data, which is used for any saved files and plot titles

R

radius value to use

first

if 'y', the algorithm will look for the second greatest maximum percent drop if the first results in the first circle being the only non-identified site

colours

list of the hoops' colours

lwds

list of hoop widths

number_sites

number of sites to manually show the results for

...

additional arguments to plot

Details

This function plots the trajectory of the animal with the identified sites of interest, removed circles and other circles plotted on top. The colours of the three types of the circles and their widths can also be defined. This can be used to see visually where the sites are along the trajectory.

Value

Plot of the identified sites' positions

Author(s)

Rhys Munden <[email protected]>

References

Munden, R., Borger , L., Wilson, R.P., Redcliffe, J., Loison, A., Garel, M. and Potts, J.P. in review. Making sense of ultra-high-resolution movement data: an algorithm for inferring sites of interest.

See Also

See also Alt_Alg to find the residence times. Sites can be used to find the coordinates of the centres of the sites and non-overlapping circles from the csv files produced by Alt_Alg.

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
##Find the current working directory
wd = getwd()
##Set the working directory as the temporary one
setwd(tempdir())
##Load the data
data(OU_14)
t=unlist(OU_14["t"])
X=unlist(OU_14["X"])
Y=unlist(OU_14["Y"])

class(X) = "hoops"
class(Y) = "hoops"

##Calculate the residence time with a radius of 0.3 and not including the first circle
Alt_Alg("OU_14",t,X,Y,0.3,first='y',save='y')

##Plot the positions of the identified sites as well as the non-overlapping circles
plot(X,Y,"OU_14",0.3)

##The colours for the hoops can be changed
plot(X,Y,"OU_14",0.3,first='y',colours=c('tan','chocolate','maroon'))

##The thickness of hoops can also be changed
plot(X,Y,"OU_14",0.3,first='y',lwds=c(0.5,2,3.5))

##It is also possible to manually choose the number of sites
plot(X,Y,"OU_14",0.3,first='y',number_sites=4)

##Reset the original working directory
setwd(wd)

SitesInterest documentation built on Oct. 16, 2018, 5:04 p.m.