|
From: <ef...@us...> - 2010-10-03 21:17:46
|
Revision: 8725
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8725&view=rev
Author: efiring
Date: 2010-10-03 21:17:39 +0000 (Sun, 03 Oct 2010)
Log Message:
-----------
bugfix: applied patch by Stan West to fix error in colormap reversal
Modified Paths:
--------------
branches/v1_0_maint/lib/matplotlib/_cm.py
branches/v1_0_maint/lib/matplotlib/cm.py
Modified: branches/v1_0_maint/lib/matplotlib/_cm.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/_cm.py 2010-10-03 21:04:10 UTC (rev 8724)
+++ branches/v1_0_maint/lib/matplotlib/_cm.py 2010-10-03 21:17:39 UTC (rev 8725)
@@ -1554,7 +1554,7 @@
(0.000, 0.000, 0.000), (0.0547, 1.000, 1.000),
(0.250, 0.027, 0.250), #(0.2500, 0.250, 0.250),
(1.000, 1.000, 1.000)),
- 'green': ((0, 0, 0), (1, 1, 0)),
+ 'green': ((0, 0, 0), (1, 1, 1)),
'blue': (
(0.000, 0.000, 0.000), (0.500, 1.000, 1.000),
(0.735, 0.000, 0.000), (1.000, 1.000, 1.000))
Modified: branches/v1_0_maint/lib/matplotlib/cm.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/cm.py 2010-10-03 21:04:10 UTC (rev 8724)
+++ branches/v1_0_maint/lib/matplotlib/cm.py 2010-10-03 21:17:39 UTC (rev 8725)
@@ -34,7 +34,8 @@
# each time, so the colors are identical
# and the result is shades of gray.
else:
- valnew = [(1.0 - a, b, c) for a, b, c in reversed(val)]
+ # Flip x and exchange the y values facing x = 0 and x = 1.
+ valnew = [(1.0 - x, y1, y0) for x, y0, y1 in reversed(val)]
data_r[key] = valnew
return data_r
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|