Skip to content

Commit

Permalink
Filter spectral cmaps from palette to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 11, 2017
1 parent 8153e45 commit b729add
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holoviews/plotting/mpl/__init__.py
Expand Up @@ -68,7 +68,10 @@ def get_color_cycle():
return mpl.rcParams['axes.color_cycle']

Cycle.default_cycles.update({'default_colors': get_color_cycle()})
Palette.colormaps.update({cm: plt.get_cmap(cm) for cm in plt.cm.datad})

# Filter spectral colormaps to avoid warning in mpl 2.0
Palette.colormaps.update({cm: plt.get_cmap(cm) for cm in plt.cm.datad
if cm not in ['spectral', 'spectral_r']})

style_aliases = {'edgecolor': ['ec', 'ecolor'], 'facecolor': ['fc'],
'linewidth': ['lw'], 'edgecolors': ['ec', 'edgecolor'],
Expand Down

0 comments on commit b729add

Please sign in to comment.