Description Usage Arguments Details Value See Also Examples
Adds a spot of higher or lower density to a population density object.
1 | add.hotspot(dens, x, y, altitude, sigma)
|
dens |
object of class 'density.population´ |
x |
x-coordinate of hotspot centre |
y |
y-coordinate of hotspot centre |
altitude |
height of hotspot |
sigma |
width of hotspot |
The function adds a specified two-dimensional Gaussian distribution to the given density object. The centre of the hotspot must be given in region coordinates. The height can be negative. The width is defined by sigma, the standard deviation of the Gaussian distribution.
add.hotspot
returns an object of class 'density.population´ which has the following elements:
n.interval.x |
number of x-intervals. |
n.interval.y |
number of y-intervals. |
matrix |
the (modified) density matrix. |
generate.region
to create region objects
generate.density
to create density objects
set.stripe
to include stripes of different densities
1 2 3 4 5 6 | myreg <- generate.region(x.length =100, y.width = 50)
mydens <- generate.density(myreg,nint.x = 100, nint.y = 50, southwest = 1, southeast = 10, northwest = 20)
mydens<-add.hotspot(mydens, 20,10, 100,10)
plot(mydens)
plot(mydens, method="image")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.