setColoursGrainType: Set colour scale for grain types

Description Usage Arguments Value References See Also Examples

View source: R/setColoursGrainType.R

Description

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

Usage

1

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, https://doi.org/10.5194/nhess-20-1557-2020, 2020.

See Also

grainDict, getColoursGrainType

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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 July 25, 2020, 5:06 p.m.