Revision: 7476
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7476&view=rev
Author:   jdh2358
Date:     2009-08-12 11:37:13 +0000 (Wed, 12 Aug 2009)

Log Message:
-----------
do case insensitive color string matching, as suggested in sf bug 2834598

Modified Paths:
--------------
    branches/v0_99_maint/lib/matplotlib/colors.py

Modified: branches/v0_99_maint/lib/matplotlib/colors.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/colors.py       2009-08-12 00:26:50 UTC 
(rev 7475)
+++ branches/v0_99_maint/lib/matplotlib/colors.py       2009-08-12 11:37:13 UTC 
(rev 7476)
@@ -282,13 +282,14 @@
 
         try:
             if cbook.is_string_like(arg):
-                color = self.colors.get(arg, None)
+                argl = arg.lower()
+                color = self.colors.get(argl, None)
                 if color is None:
-                    str1 = cnames.get(arg, arg)
+                    str1 = cnames.get(argl, argl)
                     if str1.startswith('#'):
                         color = hex2color(str1)
                     else:
-                        fl = float(arg)
+                        fl = float(argl)
                         if fl < 0 or fl > 1:
                             raise ValueError(
                                    'gray (string) must be in range 0-1')


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to