plotMKDE: Make an image plot of an MKDE.

Description Usage Arguments Details Value Author(s) Examples

View source: R/mkdeFunctions.R

Description

Makes an image plot of an MKDE. If the MKDE is 3D, the contours will be based on the entire MKDE, but only one level indexed by z.index will be plotted.

Usage

1
2
plotMKDE(mkde.obj, z.index=1, probs=c(0.99, 0.95, 0.90, 0.75, 0.5, 0.0),
cmap=rev(rainbow(length(probs)-1)), add=FALSE, ...)	

Arguments

mkde.obj

A 2D, 2.5D, or 3D MKDE object created with initialize2DMKDE or initialize3DMKDE and density initialized with initializeDensity

z.index

Index for the z-dimension of the density if a 3D MKDE

probs

Probabilities for image contours.

cmap

Color map for image plot.

add

FALSE to make a new plot, TRUE to add to existing plot

...

Additional graphical parameters.

Details

A plot of the density for the specified level in the z-dimension (which should be 1, the defaul value, for a 2D or 2.5D MKDE) is generated.

Value

No value is returned.

Author(s)

Jeff A. Tracey, PhD
USGS Western Ecological Research Center, San Diego Field Station
[email protected]
James Sheppard, PhD
San Diego Zoo Institute for Conservation Research
[email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(raster)
data(pandadem)
cell.sz <- 0.25*mean(res(pandadem))
ext <- extent(pandadem)
nx <- 4*ncol(pandadem)
ny <- 4*nrow(pandadem)
mkde.obj <- initializeMKDE2D(ext@xmin, cell.sz, nx, ext@ymin, cell.sz,
ny)

# set up movement data
data(panda)
mv.dat <- initializeMovementData(panda$time, panda$x, panda$y, 
sig2obs=25.0, t.max=185.0)

# estimate density
dens.res <- initializeDensity(mkde.obj, mv.dat)
mkde.obj <- dens.res$mkde.obj
mv.dat <- dens.res$move.dat
plotMKDE(mkde.obj)

Example output

Loading required package: sp
2D MKDE Computation: STARTING
	Processing move step 1 of 146
	Processing move step 2 of 146
	Processing move step 3 of 146
	Processing move step 4 of 146
	Processing move step 5 of 146
	Processing move step 6 of 146
	Processing move step 7 of 146
	Processing move step 8 of 146
	Processing move step 9 of 146
	Processing move step 10 of 146
	Processing move step 11 of 146
	Processing move step 12 of 146
	Processing move step 13 of 146
	Processing move step 14 of 146
	Processing move step 15 of 146
	Processing move step 16 of 146
	Processing move step 17 of 146
	Processing move step 18 of 146
	Processing move step 19 of 146
	Processing move step 20 of 146
	Processing move step 21 of 146
	Processing move step 22 of 146
	Processing move step 23 of 146
	Processing move step 24 of 146
	Processing move step 25 of 146
	Processing move step 26 of 146
	Processing move step 27 of 146
	Processing move step 28 of 146
	Processing move step 29 of 146
	Processing move step 30 of 146
	Processing move step 31 of 146
	Processing move step 32 of 146
	Processing move step 33 of 146
	Processing move step 34 of 146
	Processing move step 35 of 146
	Processing move step 36 of 146
	Processing move step 37 of 146
	Processing move step 38 of 146
	Processing move step 39 of 146
	Processing move step 40 of 146
	Processing move step 41 of 146
	Processing move step 42 of 146
	Processing move step 43 of 146
	Processing move step 44 of 146
	Processing move step 45 of 146
	Processing move step 46 of 146
	Processing move step 47 of 146
	Processing move step 48 of 146
	Processing move step 49 of 146
	Processing move step 50 of 146
	Processing move step 51 of 146
	Processing move step 52 of 146
	Processing move step 53 of 146
	Processing move step 54 of 146
	Processing move step 55 of 146
	Processing move step 56 of 146
	Processing move step 57 of 146
	Processing move step 58 of 146
	Processing move step 59 of 146
	Processing move step 60 of 146
	Processing move step 61 of 146
	Processing move step 62 of 146
	Processing move step 63 of 146
	Processing move step 64 of 146
	Processing move step 65 of 146
	Processing move step 66 of 146
	Processing move step 67 of 146
	Processing move step 68 of 146
	Processing move step 69 of 146
	Processing move step 70 of 146
	Processing move step 71 of 146
	Processing move step 72 of 146
	Processing move step 73 of 146
	Processing move step 74 of 146
	Processing move step 75 of 146
	Processing move step 76 of 146
	Processing move step 77 of 146
	Processing move step 78 of 146
	Processing move step 79 of 146
	Processing move step 80 of 146
	Processing move step 81 of 146
	Processing move step 82 of 146
	Processing move step 83 of 146
	Processing move step 84 of 146
	Processing move step 85 of 146
	Processing move step 86 of 146
	Processing move step 87 of 146
	Processing move step 88 of 146
	Processing move step 89 of 146
	Processing move step 90 of 146
	Processing move step 91 of 146
	Processing move step 92 of 146
	Processing move step 93 of 146
	Processing move step 94 of 146
	Processing move step 95 of 146
	Processing move step 96 of 146
	Processing move step 97 of 146
	Processing move step 98 of 146
	Processing move step 99 of 146
	Processing move step 100 of 146
	Processing move step 101 of 146
	Processing move step 102 of 146
	Processing move step 103 of 146
	Processing move step 104 of 146
	Processing move step 105 of 146
	Processing move step 106 of 146
	Processing move step 107 of 146
	Processing move step 108 of 146
	Processing move step 109 of 146
	Processing move step 110 of 146
	Processing move step 111 of 146
	Processing move step 112 of 146
	Processing move step 113 of 146
	Processing move step 114 of 146
	Processing move step 115 of 146
	Processing move step 116 of 146
	Processing move step 117 of 146
	Processing move step 118 of 146
	Processing move step 119 of 146
	Processing move step 120 of 146
	Processing move step 121 of 146
	Processing move step 122 of 146
	Processing move step 123 of 146
	Processing move step 124 of 146
	Processing move step 125 of 146
	Processing move step 126 of 146
	Processing move step 127 of 146
	Processing move step 128 of 146
	Processing move step 129 of 146
	Processing move step 130 of 146
	Processing move step 131 of 146
	Processing move step 132 of 146
	Processing move step 133 of 146
	Processing move step 134 of 146
	Processing move step 135 of 146
	Processing move step 136 of 146
	Processing move step 137 of 146
	Processing move step 138 of 146
	Processing move step 139 of 146
	Processing move step 140 of 146
	Processing move step 141 of 146
	Processing move step 142 of 146
	Processing move step 143 of 146
	Processing move step 144 of 146
	Processing move step 145 of 146
	Processing move step 146 of 146
	Maximum voxel density = 0.00162413
	Sum of voxel densities = 1
2D MKDE Computation: DONE

mkde documentation built on May 2, 2019, 6:46 a.m.