HOME/Articles/

matplotlib example custom palette (snippet)

Article Outline

Python matplotlib example 'custom palette'

python custom palette

Python matplotlib example: custom palette

from matplotlib.pyplot import cm 
color=cm.rainbow(np.linspace(0,1,len(emotions)))
color = dict(zip(emotions, color))
color