Styling data
Classification¶
How values become colours: the ramp picks the colours, the scheme groups the values.
Quick reference¶
| Utility | Does | Example |
|---|---|---|
ramp-<name>[-r] |
Colour ramp for data; -r reverses it | ramp-viridisramp-viridis-rramp-ylorrd |
scheme-q<k>scheme-e<k>scheme-[b1,b2]scheme-linearscheme-catscheme-div |
How data values are grouped into colour classes, or scheme-linear for none | scheme-q5scheme-e4scheme-[10,50,100] |
Schemes¶
| Scheme | Groups values | Best for |
|---|---|---|
scheme-q5 |
into 5 classes with the same number of features each (3 to 9) | most choropleths; every colour gets used |
scheme-e5 |
into 5 equal steps of the range | evenly spread data; values people compare as numbers |
scheme-[10,25,50] |
at breaks you choose | thresholds that mean something, such as policy limits |
scheme-linear |
not at all: colour runs smoothly | continuous surfaces and gradients |
scheme-div, scheme-div-[25] |
7 symmetric classes around 0 or a value | above and below an average or a target |
scheme-cat |
one colour per value | names, types, codes |
Quantiles with many tied values give fewer classes, with a warning. Categories beyond twelve are grouped as "other".
Quantiles¶
No classes¶
Your own breaks¶
Diverging¶
scheme-div keeps the classes symmetric around the centre. On skewed data, where most values sit on one side, use your own breaks around the centre with a diverging ramp, as the US unemployment example does.




