I often like to define my own colormaps using hex strings, e.g.
hex_list = ['#FFF295', '#FFD555', '#FF850B', '#D55000', '#D50000', '#550040', 
'#600080', '#000080', '#0000D5', '#0B85FF', '#55AAFF', '#95CAFF']
However, when I pass them to contourf and try to extend the colorbar... 
plt.contourf(x, y, data, colors=hex_list, extend='both')
... it always ends up that the color of the final segment on the extended ends 
of the colorbar is the same color as the extension segment (i.e. the bit in the 
little arrow). This happens even when hex_list is much longer than the actual 
number of segments required.
Has anyone else had this problem?
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to