Skip to contents

Create a map of the provided variable on the RESOURCECODE field grid

Usage

rscd_mapplot(
  z,
  name = "Depth (m)",
  zlim = NULL,
  palette = "YlOrRd",
  direction = 1,
  transform = "identity"
)

Arguments

z

the data ro plot: a vector of the same size as the grid (328,030 rows).

name

name of the variable plored, to be included in the legend.

zlim

limits of the scale. See continuous_scale for details.

palette

If a string, will use that named palette. See scale_colour_brewer for other options.

direction

Sets the order of colours in the scale. See scale_colour_brewer for details.

transform

Transformation to apply to the color scale. See continuous_scale for details.

Value

a ggplot2 object

Examples

# Ensure that data package is available before running the example.
# If it is not, see the `resourcecode` package vignette for details
# on installing the required data package.
if (requireNamespace("resourcecodedata", quietly = TRUE)) {
  rscd_mapplot(resourcecodedata::rscd_field$depth)
}