[yt-svn] commit/yt: MatthewTurk: Only register colormaps that aren't already registered in matplotlib.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Dec 3 16:41:19 PST 2013
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/55194517b9af/
Changeset: 55194517b9af
Branch: yt
User: MatthewTurk
Date: 2013-12-03 23:42:10
Summary: Only register colormaps that aren't already registered in matplotlib.
This helps avoid clobbering items in the Glue colormap space.
Thanks to John ZuHone for pointing this out.
Affected #: 1 file
diff -r d85c1291287fa5e92510950868fb582e562b18a3 -r 55194517b9af79c7524896c46b8d3907c2b9486a yt/visualization/color_maps.py
--- a/yt/visualization/color_maps.py
+++ b/yt/visualization/color_maps.py
@@ -120,7 +120,7 @@
# Add colormaps in _colormap_data.py that weren't defined here
_vs = np.linspace(0,1,255)
for k,v in _cm.color_map_luts.iteritems():
- if k not in yt_colormaps:
+ if k not in yt_colormaps and k not in mcm.cmap_d:
cdict = { 'red': zip(_vs,v[0],v[0]),
'green': zip(_vs,v[1],v[1]),
'blue': zip(_vs,v[2],v[2]) }
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list