plot.utilizationDistribution: Plot or draw contours for utilization distributions.

Description Usage Arguments Details See Also Examples

Description

Plots the given utilization distribution, either by applying a colourmap to the values or by drawing contours where the value passes certain levels.

Usage

1
2
3
4
5
6
## S3 method for class 'utilizationDistribution'
plot(x, col = hcl(1:length(x) * 360/length(x), 50, 70),
    xlim = NULL, ylim = NULL, add = FALSE, plot.range=sapply(x, range), ...)
## S3 method for class 'utilizationDistribution'
contour(x, levels = 0.99, col = hcl(1:length(x) * 360/length(x), l=35), 
    xlim = NULL, ylim = NULL, labels = levels, add = FALSE, ...)

Arguments

x

The utilization distribution to plot.

col

The colours to use in the plot. May be a vector of colours or a list containing the colour scheme for each ID.

xlim

The minimum and maximum x coordinate to plot.

ylim

The minimum and maximum y coordinate to plot.

add

Logical specifying if plot should be added to an already existing plot; defaults to FALSE.

plot.range

The range on which the colour map is specified. Either two numbers or a matrix with two rows and one column per ID.

levels

The level(s) at which to draw contours.

labels

The labels to print with the contours. Use drawlabels=FALSE to hide them altogether.

...

Other graphical parameters, e.g. from plot.default or contour.default.

Details

If col is a vector, it is assumed to contain a colour code for each grid to be plotted. The colour code for each value of the UD is derived by varying the opacity of the provided colour. If the length of col does not match the number of UDs to plot, it is recycled as usual.

If col is a list, it is assumed to contain one element for each UD to plot, specifying exactly which colours to use in that plot.

See Also

utilizationDistribution, SpatialPolygons

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("vervet_monkeys", package="moveBB")

## Compute the UD and plot the result for one ID
ud <- utilizationDistribution(monkey.tr)
plot(ud)

## Specify nicer colours
plot(ud, col=c("red","green"))
## Add a contour to the existing plot in the same colours
#contour(ud, col=c("red","green"), add=TRUE)

moveBB documentation built on May 2, 2019, 5:50 p.m.