Plot a SpatialPixelsRangeMap

Share:

Description

This is a wrapper around spplot

Arguments

palette

The name of a color palette. When NULL all the qualitative color palettes are returned.

Methods

signature(x = "SpatialPixelsRangeMap", y = "missing")

x=SpatialPixelsRangeMap

plot(x, colorpalette = brewer.pal.get('Spectral')[11:1], ncols = 20, scales = FALSE, style = "equal", ...)

x a SpatialPixelsRangeMap object.
colorpalette A color palette.
ncols Number of color classes required, default to 20; argument to be passed to classIntervals
scales If ‘FALSE’, default, axes scale are not drawn.
style class interval style; see classIntervals for more details
... Any argument that can be passed to spplot

Note

brewer.pal.get is a simple wrapper around brewer.pal.info

Author(s)

Mihai Valcu valcu@orn.mpg.de

See Also

classIntervals brewer.pal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require(rangeMapper)
dbcon = rangeMap.start(file = "test.sqlite", overwrite = TRUE, dir = tempdir() )
f = system.file(package = "rangeMapper", "extdata", "wrens", "vector_combined")
global.bbox.save(con = dbcon, bbox = f, 
	p4s = CRS("+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +ellps=WGS84 +units=km +no_defs") ) 
gridSize.save(dbcon, gridSize = 200)  # cell size 2 deg
canvas.save(dbcon) 
processRanges(spdf = readOGR(f, "wrens", verbose = FALSE), con =  dbcon, ID = "sci_name")
rangeMap.save(dbcon) # species richness


# PLOTS
all = rangeMap.fetch(dbcon)
SR = rangeMap.fetch(dbcon, 'species_richness')

plot(all)
plot(SR, style = "fisher", sub = "Wrens species richness")

pal = brewer.pal.get('RdYlGn')[11:1]

plot(SR, style = "fisher", colorpalette = pal)