[Python-modules-commits] [python-mplexporter] 121/135: BUG: correctly handle color='none'
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-mplexporter.
commit 9d737670bf864c51246f6a95f24c2147f12584ca
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date: Sat Apr 19 08:18:20 2014 -0700
BUG: correctly handle color='none'
---
mplexporter/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mplexporter/utils.py b/mplexporter/utils.py
index 606898a..ed76206 100644
--- a/mplexporter/utils.py
+++ b/mplexporter/utils.py
@@ -20,7 +20,7 @@ from matplotlib import ticker
def color_to_hex(color):
"""Convert matplotlib color code to hex color code"""
- if color in ['none', 'None', None]:
+ if color is None or colorConverter.to_rgba(color)[3] == 0:
return 'none'
else:
rgb = colorConverter.to_rgb(color)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mplexporter.git
More information about the Python-modules-commits
mailing list