Skip to content

Commit

Permalink
Do not reverse colormaps with _r suffix a second time (#4931)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed May 17, 2021
1 parent 585dae3 commit 08dd8d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions holoviews/plotting/util.py
Expand Up @@ -691,14 +691,16 @@ def info(provider,names):
else:
mpl_cmaps = list(cm.cmaps_listed)+list(cm.datad)
cmaps += info('matplotlib', mpl_cmaps)
cmaps += info('matplotlib', [cmap+'_r' for cmap in mpl_cmaps])
cmaps += info('matplotlib', [cmap+'_r' for cmap in mpl_cmaps
if not cmap.endswith('_r')])
except:
pass
if 'bokeh' in provider:
try:
from bokeh import palettes
cmaps += info('bokeh', palettes.all_palettes)
cmaps += info('bokeh', [p+'_r' for p in palettes.all_palettes])
cmaps += info('bokeh', [p+'_r' for p in palettes.all_palettes
if not p.endswith('_r')])
except:
pass
if 'colorcet' in provider:
Expand All @@ -707,7 +709,7 @@ def info(provider,names):
cet_maps = palette_n.copy()
cet_maps['glasbey_hv'] = glasbey_hv # Add special hv-specific map
cmaps += info('colorcet', cet_maps)
cmaps += info('colorcet', [p+'_r' for p in cet_maps])
cmaps += info('colorcet', [p+'_r' for p in cet_maps if not p.endswith('_r')])
except:
pass
return sorted(unique_iterator(cmaps))
Expand Down

0 comments on commit 08dd8d2

Please sign in to comment.