plotSpatialComparison: Plot a comparison between two spatial layers

View source: R/plotSpatialComparison.R

plotSpatialComparisonR Documentation

Plot a comparison between two spatial layers

Description

This function is for plotting maps from Comparison objects (or a list of those Comparisons). Three types of comparisons plots are supported: 'difference' - a difference map; "values" - the absolute values plotted in panels and "percentage.difference" - the percentage differences.

Usage

plotSpatialComparison(
  comparisons,
  type = c("difference", "percentage.difference", "values", "nme"),
  limits = NULL,
  legend.title,
  panel.bg.col = "white",
  override.cols = NULL,
  symmetric.scale = TRUE,
  do.phase = FALSE,
  ...
)

Arguments

comparisons

The data to plot, must be a Comparison or a list of Comparisons

type

A character specifying what type of plot to make. Can be "difference" (default, for a difference plot), "percentage.difference", "values" (actual values, side-by-side) or "nme" (for the Normalised Mean Error, not yet implemented)

limits

A numeric vector with two members (lower and upper limit) to limit the plotted values.

legend.title

A character string or expression to override the default legend title. Set to NULL for no legend title. The default legend title is the units of the Quantity of the first Comparison provided in the comparisions argument. This argument allows general flexibility, but it is particularly handy to facilitate expressions for nicely marked up subscript and superscript.

panel.bg.col

Colour string for the panel background, default to "white" for absolute values plots, and a grey for difference plots.

override.cols

A colour palette function to override the defaults.

symmetric.scale

If plotting a differences, make the scale symmetric around zero (default is TRUE)

do.phase

Logical, only applies to plotting Comparison objects of type "seasonal". If TRUE plot the the seasonal phase, if FALSE (the default), plot the seasonal concentration.

...

Parameters passed to plotSpatial

Details

A wrapper for around plotSpatial to plot the spatial Comparisons as maps. Extra arguments to plotSpatial can also be specified.

Value

Returns a ggplot object

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de

See Also

plotSpatial, compareLayers


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.