makeColorMatrix: Convert Raster to colour matrix usable by raster function for...

.makeColorMatrixR Documentation

Convert Raster to colour matrix usable by raster function for plotting

Description

Internal function.

Usage

.makeColorMatrix(
  grobToPlot,
  zoomExtent,
  maxpixels,
  legendRange,
  cols = NULL,
  prevMinMax,
  na.color = "#FFFFFF00",
  zero.color = NULL,
  skipSample = TRUE
)

Arguments

grobToPlot

A SpatialObject.

zoomExtent

An Extent object for zooming to. Defaults to whole extent of grobToPlot.

maxpixels

Numeric. Number of cells to subsample the complete grobToPlot.

legendRange

Numeric vector giving values that, representing the lower and upper bounds of a legend (i.e., 1:10 or c(1,10) will give same result) that will override the data bounds contained within the grobToPlot.

cols

Colours specified in a way that can be understood directly or by colorRampPalette().

na.color

Character string indicating the colour for NA values. Default transparent.

zero.color

Character string indicating the colour for zero values, when zero is the minimum value. Otherwise, it is treated as any other colour. Default transparent. Use NULL if zero should be the value given to it by the colortable associated with the raster.

skipSample

Logical. If no downsampling is necessary, skip. Default TRUE.

Author(s)

Eliot McIntire


quickPlot documentation built on July 9, 2023, 6:02 p.m.