View source: R/getColoursGrainType.R
getColoursGrainType | R Documentation |
Grain colours are defined in the grainDict
data.frame and the definitions can be changed with setColoursGrainType
getColoursGrainType(Grains, grainDict. = grainDict)
Grains |
grain type (character or list of characters) |
grainDict. |
lookup table to use. Note, the easiest and best way to do this is via |
Array with HTML colour codes
phaegeli, shorton, fherla
setColoursGrainType, getColoursDensity, getColoursGrainSize, getColoursHardness, getColoursLWC, getColoursSnowTemp
Grains <- c('PP', 'DF', 'RG', 'FC', 'FCxr', 'DH', 'SH', 'MF', 'MFcr', 'IF')
Colours <- getColoursGrainType(Grains)
Colours
plot(1:length(Grains), col = Colours, pch = 20, cex = 3)
text(1:length(Grains), 1:length(Grains), Grains, pos = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.