I think this should work:
cm = matplotlib.colors.LinearSegmentedColormap.from_list('phases', ['g', 'y', 'c', 'm', 'b', 'r']
plt.register_cmap('phases', cm)
But when I type:
plt.cmap.phases
I get an attribute error. So clearly my cmap isn't being registered as I thought. But it's not clear why.
Ben