Learn R Programming

sarp.snowprofile (version 1.3.2)

setColoursGrainType: Set colour scale for grain types

Description

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

Usage

setColoursGrainType(ScaleName)

Value

data.frame containing the new colour values stored in grainDict

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)

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, tools:::Rd_expr_doi("10.5194/nhess-20-1557-2020"), 2020.

See Also

grainDict, getColoursGrainType

Examples

Run this code

## 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')

Run the code above in your browser using DataLab