Skip to content

Commit

Permalink
Commit to removing _cmaps_data
Browse files Browse the repository at this point in the history
It does not appear to be used.
  • Loading branch information
matthew-brett committed Mar 27, 2021
1 parent 96846c7 commit 3115f5e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions nipy/labs/viz_tools/cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,11 @@ def alpha_cmap(color, name=''):
if 'red' in _cmapspec:
_cmap_d[_cmapname] = _colors.LinearSegmentedColormap(
_cmapname, _cmapspec, _cm.LUTSIZE)
_reversed = _cmap_d[_cmapname].reversed(name=_cmapname_r)
_cmap_d[_cmapname_r] = _reversed
_cmaps_data[_cmapname_r] = _reversed._segmentdata.copy()
_cmap_d[_cmapname_r] = _cmap_d[_cmapname].reversed(name=_cmapname_r)
else:
_revspec = list(reversed(_cmapspec))
if len(_revspec[0]) == 2: # e.g., (1, (1.0, 0.0, 1.0))
_revspec = [(1.0 - a, b) for a, b in _revspec]
_cmaps_data[_cmapname_r] = _revspec

_cmap_d[_cmapname] = _colors.LinearSegmentedColormap.from_list(
_cmapname, _cmapspec, _cm.LUTSIZE)
Expand Down

0 comments on commit 3115f5e

Please sign in to comment.