adehabitat (version 1.8.20)

plot.area: Graphical Display of Objects of Class "area"

Description

plot.area allows a graphical display of objects of class "area".

Usage

# S3 method for area
plot(x, which = levels(x[,1]),
          colpol = rep("green", nlevels(x[, 1])),
          colborder = rep("black", nlevels(x[, 1])),
          lwd = 2, add = FALSE, ...)

Arguments

x

an object of class "area"

which

a vector of character indicating the polygons to be plotted

colpol

a vector of the color for filling the polygon. The default, NA, is to leave polygons unfilled

colborder

a vector of the color to draw the border. The default. Use border = NA to omit borders

lwd

the border width, a positive number

add

logical. if TRUE, the polygons are added to a previous plot

additional arguments to be passed to the generic function plot

See Also

area.plot for another way to display objects of class "area"

Examples

Run this code
# NOT RUN {
## Loading the relocations of wild boars
## monitored using radio-tracking
data(puechabon)
locs <-  puechabon$locs
el <- getkasc(puechabon$kasc, "Elevation")

## Estimation of the MCP home ranges of the animals
cp <- mcp(locs[,4:5], locs[,1])

## Use of plot.area to display the results
plot(cp)

## different colors:
color <- c("red", "blue", "green", "yellow")
lev <- levels(cp[,1])
image(el)
plot(cp, colpol = color, add = TRUE)
legend(697198, 3165529, legend = lev, fill = color)

## or:
image(el)
plot(cp, colborder = color, colpol = NA, add = TRUE)
legend(697198, 3165529, legend = lev, fill = color)

## plots one animal
image(el)
plot(cp, which = "Brock", add = TRUE)

# }

Run the code above in your browser using DataLab