plot-rmap.frame-missing-method: Plot a rmap.frame

Description Usage Arguments Value See Also Examples

Description

Plot a rmap.frame

Usage

1
2
3
4
## S4 method for signature 'rmap.frame,missing'
plot(x,
  colours = palette_rangemap("set1"), outlierDetector, boundary,
  boundaryCol = 1, boundarySize = 0.5, ...)

Arguments

x

a rmap.frame object.

colours

a vector of colours to pass to scale_fill_gradientn.

outlierDetector

a function used to detect ouliers. Should return lower and upper limits of non-outliers.

boundary

a Spatial* object which can be fortifyed.

boundaryCol

boundary color, see geom_polygon.

boundarySize

boundary size, geom_polygon.

...

further arguments to pass to arrangeGrob.

Value

a ggplot object for one map or a gtable in case of more than one map.

See Also

plot,SpatialPixelsRangeMap,missing-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
require(rangeMapper)
breding_ranges = rgdal::readOGR(system.file(package = "rangeMapper",
     "extdata", "wrens", "vector_combined"), "wrens", verbose = FALSE)[1:70, ]
data(wrens)
d = subset(wrens, select = c('sci_name', 'body_mass', 'clutch_size') )
con = ramp("wrens.sqlite", gridSize = 4, spdf = breding_ranges, biotab = d, ID = "sci_name",
            FUN = "median", overwrite = TRUE)
m = rangeMap.fetch(con, c('median_body_mass', 'median_clutch_size'), spatial = FALSE)
plot(m, ncol = 2)

wrens_boundary = rgeos::gUnionCascaded(breding_ranges)
plot(m, ncol = 2, boundary = wrens_boundary)

## Not run: 
if(require(extremevalues))
plot(m, ncol = 2, outlierDetector = function(x) getOutliersI(x)$limit)

## End(Not run)

valcu/rangeMapper documentation built on Feb. 6, 2021, 8:20 p.m.