Description Usage Arguments Value Examples
This function sorts a vector of palettes in rough order of brightness (using the sum of each component in a palette as its brightness).
1 | sortPalettes(palettes)
|
palettes |
A list of palettes. |
A sorted list of palettes, in brighness order.
1 2 3 4 5 6 7 | palettes<-list(data.frame(red=c(0.1, 0.2, 0.9), green=c(0.4, 0.5, 0.9),
blue=c(0.7, 0.8, 0.9)),
data.frame(red=c(0.1, 0.2, 0.3), green=c(0.4, 0.5, 0.6),
blue=c(0.7, 0.8, 0.9)),
data.frame(red=c(0.1, 0.2, 0.1), green=c(0.4, 0.5, 0.1),
blue=c(0.7, 0.8, 0.1)))
sorted<-sortPalettes(palettes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.