Learn R Programming

sarp.snowprofile (version 1.3.2)

getColoursPercentage: Gets colours for plotting the snow layer property 'percentage'

Description

Gets colours for plotting the snow layer property 'percentage', as used for example for distributions from 0--1.

Usage

getColoursPercentage(
  Values,
  Resolution = 101,
  Min = 0,
  Max = 1,
  ClrRamp = c("Blues", "Greys", "Greys_transparent")[1]
)

Value

Array with HTML colour codes

Arguments

Values

of the 'percentage' variable

Resolution

Resolution of colour scale. Default is 100.

Min

Minimum values of the percentage (for colouring)

Max

Maximum --=--

ClrRamp

Three different colourmaps can be chosen from: "Blues", "Greys", "Greys_transparent"

Author

fherla

See Also

getColoursGrainSize, getColoursGrainType, getColoursHardness, getColoursLWC, getColoursSnowTemp, getColoursStability

Examples

Run this code

prct <- seq(0, 1, by=0.1)
plot(x = rep(1,length(prct)), y = prct,
     col = getColoursPercentage(prct), pch = 19, cex = 3)

plot(x = rep(1,length(prct)), y = prct,
     col = getColoursPercentage(prct, ClrRamp = "Greys"), pch = 19, cex = 3)


Run the code above in your browser using DataLab