Graphical Display of Objects of Class "area"

Share:

Description

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

Usage

1
2
3
4
5
## S3 method for class '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

Author(s)

Clement Calenge clement.calenge@oncfs.gouv.fr

See Also

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

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
## 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.