Learn R Programming

CENFA (version 1.1.1)

stretchPlot: Contrast adjustments for RasterLayer plots

Description

A plotting function that provides methods for improving the contrast between values.

Usage

stretchPlot(x, type = "linear", n, ...)

# S4 method for RasterLayer stretchPlot(x, type = "linear", n, ...)

Arguments

x

a RasterLayer

type

character. Possible values are "linear", "hist.equal", and "sd"

n

number of standard deviations to include if type = "sd"

...

Additional arguments for raster::plot

Value

Returns a RasterLayer plot.

Details

If type = "hist.equal", a histogram equalization procedure will be applied to the values of x. If type = "sd", the values of x will be scaled between values that fall between n standard deviations of the mean.

Examples

Run this code
# NOT RUN {
mod <- enfa(x = climdat.hist, s.dat = ABPR, field = "CODE")
sm <- sensitivity_map(mod)
stretchPlot(sm)
stretchPlot(sm, type = "hist.equal")
stretchPlot(sm, type = "sd", n = 2)

# }

Run the code above in your browser using DataLab