# NOT RUN {
 
# A simple density surface with a constant value of 1 can be created within a rectangular 
# region using 
# the default values:
density <- make.density()
plot(density)
plot(make.region(), add = TRUE)
  
# The example below shows hot to add high and low point to the density surface                   
# }
# NOT RUN {
pop.density <- make.density(region.obj = region, x.space = 10, 
 y.space = 10, constant = 0.5) 
 
pop.density <- add.hotspot(pop.density, centre = c(50, 200), 
 sigma = 100, amplitude = 0.1)
pop.density <- add.hotspot(pop.density, centre = c(500, 700), 
 sigma = 900, amplitude = 0.05)
pop.density <- add.hotspot(pop.density, centre = c(300, 100), 
 sigma = 100, amplitude = -0.15)
#New plot features
plot(pop.density)
plot(region, add = TRUE)
#Block style plotting
plot(pop.density, contours = FALSE, style = "blocks")
plot(region, add = TRUE)
# }
Run the code above in your browser using DataLab