setColoursGrainType: Set colour scale for grain types

View source: R/setColoursGrainType.R

setColoursGrainTypeR Documentation

Set colour scale for grain types

Description

Currently, you can choose between 'iacs', 'iacs2', 'sarp', or 'sarp-reduced'.

Usage

setColoursGrainType(ScaleName)

Arguments

ScaleName

Name of graintype colour scale

  • ⁠iacs:⁠ scale defined by the International Classification of Seasonal Snow on the Ground

  • ⁠iacs2:⁠ scale defined by the International Classification of Seasonal Snow on the Ground with a dark red colour for MFcr layers so that MF and MFcr layers can be better distinguished.

  • ⁠sarp:⁠ hazard adjusted colours for grain types based on Horton et al. (2020)

  • ⁠sarp-reduced:⁠ hazard adjusted colours for groups of grain types based on Horton et al. (2020)

Value

data.frame containing the new colour values stored in grainDict

References

Horton, S., Nowak, S., and Haegeli, P.: Enhancing the operational value of snowpack models with visualization design principles, Nat. Hazards Earth Syst. Sci., 20, 1557–1572, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5194/nhess-20-1557-2020")}, 2020.

See Also

grainDict, getColoursGrainType

Examples


## Current/default grain type colours
grainDict
plot(SPpairs$A_manual, main = 'Snow profile with default colours')

## Change to IACS colours
grainDict <- setColoursGrainType('IACS')
grainDict
plot(SPpairs$A_manual, main = 'Snow profile with IACS colours')

## Change to IACS colours with adjusted MFcr (darkred)
grainDict <- setColoursGrainType('IACS2')
grainDict
plot(SPpairs$A_manual, main = 'Snow profile with IACS colours and adjusted darkred MFcr')

## Change to SARP colours
grainDict <- setColoursGrainType('SARP')
grainDict
plot(SPpairs$A_manual, main = 'Snow profile with SARP colours')

## Change to reduced SARP colours
grainDict <- setColoursGrainType('SARP-reduced')
grainDict
plot(SPpairs$A_manual, main = 'Snow profile with a reduced set of SARP colours')


sarp.snowprofile documentation built on March 31, 2023, 5:17 p.m.