pl.spide_colours

pl.spide_colours(role=None, n=9)

The spiDE colours (R spiDEColours).

spiDE gives each role one colour and uses it in every plot: gold and violet for a slope that rises or falls with niche density (and for the diverging t scale), dark violet and pink for the first and second level of the condition, the viridis “magma” ramp for magnitudes (light to dark on the page), a brighter part of the same ramp (dark to bright) for plots in tissue coordinates, drawn on a dark panel, and the Okabe-Ito colours for a nuisance factor such as slide. The colours were checked under simulated deuteranopia, protanopia and tritanopia.

Parameters

Name Type Description Default
role ('direction', 'condition', 'magnitude', 'spatial', 'diverging', 'nuisance') None returns the named fixed colours. "direction"
n int The number of colours of a ramp, or of nuisance levels. 9

Returns

Name Type Description
dict or list of str {name: colour} for role=None, else a list of colours (hex, or R’s greyNN names for the fixed ones).

See Also

style : The matplotlib style that goes with these colours.

Examples

from spidepy.pl import spide_colours
spide_colours("direction", 2)
['#C99A16', '#5B2C9E']
spide_colours("condition", 2)
['#3E1A78', '#E05A9E']
len(spide_colours("magnitude", 5))
5
sorted(spide_colours())[:3]
['dim', 'down', 'faint']