Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not reverse colormaps with _r suffix a second time #4931

Merged
merged 1 commit into from May 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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