DamienIrving / climate-analysis

Code used for the analysis and visualisation of climate data during my PhD
MIT License
40 stars 19 forks source link

Colourbars #6

Open DamienIrving opened 9 years ago

DamienIrving commented 9 years ago

When I try and create a custom colourmap (using the hexidecimal values) with matplotlib or iris and use extensions, the last colour and the extension colour are the same.

DamienIrving commented 9 years ago

It turns out you just can't pass a Seaborn palette to a generic matplotlib function, so that won't work (which is a shame because Seaborn has nice palettes)

I think I need to give up on trying to make custom colourmaps with hexidecimal values. There are plenty of good defaults and you can make your own linear segmented colormaps anyway, so it's more effort than it's worth: http://matplotlib.org/examples/color/colormaps_reference.html http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps

DamienIrving commented 9 years ago

I need to be careful when picking colourbars (see the end of the rainbow for details). Most of the time I need a sequential one (i.e. low colour to high colour; and it's widely accepted that jet is not an appropriate choice for this) or a divergent one (i.e. centring on white). When I occasional need a categorical one (i.e. there is no inference of higher or lower, only different) then there are must better alternatives to jet or rainbow.