[yt-svn] commit/yt: MatthewTurk: Adding an option to allow cmap to be None

Bitbucket commits-noreply at bitbucket.org
Tue Jan 24 13:32:03 PST 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/2b38aa0f9063/
changeset:   2b38aa0f9063
branch:      yt
user:        MatthewTurk
date:        2012-01-24 22:23:57
summary:     Adding an option to allow cmap to be None
affected #:  1 file

diff -r bec1ffe229139eee7247fa4b8a9a5b96480a24e3 -r 2b38aa0f90637c2cc1c5c0b21bc1aaa8d95d5d16 yt/visualization/plot_types.py
--- a/yt/visualization/plot_types.py
+++ b/yt/visualization/plot_types.py
@@ -231,7 +231,7 @@
                 cmap = yt_colormaps[str(cmap)]
             elif hasattr(matplotlib.cm, cmap):
                 cmap = getattr(matplotlib.cm, cmap)
-        if not is_colormap(cmap):
+        if not is_colormap(cmap) and cmap is not None:
             raise RuntimeError("Colormap '%s' does not exist!" % str(cmap))
         else:
             self.cmap = cmap

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