View source: R/getColoursPercentage.R
getColoursPercentage | R Documentation |
Gets colours for plotting the snow layer property 'percentage', as used for example for distributions from 0–1.
getColoursPercentage(
Values,
Resolution = 101,
Min = 0,
Max = 1,
ClrRamp = c("Blues", "Greys", "Greys_transparent")[1]
)
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" |
Array with HTML colour codes
fherla
getColoursGrainSize, getColoursGrainType, getColoursHardness, getColoursLWC, getColoursSnowTemp, getColoursStability
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.