plotRVB: Apply a color gradient to a raster

Description Usage Arguments Value Author(s) Examples

View source: R/plotRVB.R

Description

This function applies a color gradient to a raster where color is defined by the user.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plotRVB(
  x = NULL,
  zlim = NULL,
  type = NULL,
  palette = "Spectral",
  reverse = TRUE,
  alpha = 255,
  bgalpha = 0,
  colNA = NA,
  axes = FALSE,
  xlab = "",
  ylab = "",
  add = FALSE,
  zmax = NULL
)

Arguments

x

RasterLayer a RasterLayer to plot.

zlim

numeric a vector of length 2. Range of values to plot.

type

string not implemented.

palette

string not well implemented.

reverse

boolean not well implemented.

alpha

integer transparency factor between 0 (transparent) and 255 (opaque).

bgalpha

integer transparency factor for NA values between 0 (transparent) and 255 (opaque).

colNA

string color for the background (i.e. NA values).

axes

boolean If TRUE, axes are added.

xlab

string x-axis label.

ylab

string y-axis label.

add

boolean If TRUE, raster is added the active graphical device.

zmax

numeric not implemented.

Value

This function returns a 3-bands raster with the first layer is for the Red, the second for the Green and the third for the Blue. Each non NA cell contains the quantity of a specific color (R, G or B).

Author(s)

Nicolas CASAJUS, nicolas.casajus@fondationbiodiversite.com

Examples

1
# No example.

FRBCesab/ecorar documentation built on June 2, 2021, 8:18 p.m.