|
From: <jd...@us...> - 2009-08-05 19:49:51
|
Revision: 7395
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7395&view=rev
Author: jdh2358
Date: 2009-08-05 19:49:43 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
fixed an alpha colormapping bug posted on sf 2832575
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-05 19:18:26 UTC (rev 7394)
+++ branches/v0_99_maint/lib/matplotlib/colors.py 2009-08-05 19:49:43 UTC (rev 7395)
@@ -488,7 +488,7 @@
if not self._isinit: self._init()
alpha = min(alpha, 1.0) # alpha must be between 0 and 1
alpha = max(alpha, 0.0)
- self._lut[:-3, -1] = alpha
+ self._lut[:,-1] = alpha
mask_bad = None
if not cbook.iterable(X):
vtype = 'scalar'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-08-08 06:07:14
|
Revision: 7424
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7424&view=rev
Author: efiring
Date: 2009-08-08 06:07:06 +0000 (Sat, 08 Aug 2009)
Log Message:
-----------
Restore default colormap behavior: no color (alpha = 0) for masked data
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-08 02:06:56 UTC (rev 7423)
+++ branches/v0_99_maint/lib/matplotlib/colors.py 2009-08-08 06:07:06 UTC (rev 7424)
@@ -488,7 +488,10 @@
if not self._isinit: self._init()
alpha = min(alpha, 1.0) # alpha must be between 0 and 1
alpha = max(alpha, 0.0)
- self._lut[:,-1] = alpha
+ self._lut[:-1,-1] = alpha # Don't assign global alpha to i_bad;
+ # it would defeat the purpose of the
+ # default behavior, which is to not
+ # show anything where data are missing.
mask_bad = None
if not cbook.iterable(X):
vtype = 'scalar'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-12 11:37:20
|
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.
|
|
From: <ef...@us...> - 2009-10-11 02:51:14
|
Revision: 7864
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7864&view=rev
Author: efiring
Date: 2009-10-11 02:51:06 +0000 (Sun, 11 Oct 2009)
Log Message:
-----------
docstring fixup: LinearSegmentedColormap.from_list
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-10-09 17:38:48 UTC (rev 7863)
+++ branches/v0_99_maint/lib/matplotlib/colors.py 2009-10-11 02:51:06 UTC (rev 7864)
@@ -621,6 +621,10 @@
.. seealso::
+ :meth:`LinearSegmentedColormap.from_list`
+ Static method; factory function for generating a
+ smoothly-varying LinearSegmentedColormap.
+
:func:`makeMappingArray`
For information about making a mapping array.
"""
@@ -641,8 +645,8 @@
def from_list(name, colors, N=256):
"""
Make a linear segmented colormap with *name* from a sequence
- of *colors* which evenly transitions from colors[0] at val=1
- to colors[-1] at val=1. N is the number of rgb quantization
+ of *colors* which evenly transitions from colors[0] at val=0
+ to colors[-1] at val=1. *N* is the number of rgb quantization
levels.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-11-16 23:49:25
|
Revision: 7970
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7970&view=rev
Author: efiring
Date: 2009-11-16 23:49:11 +0000 (Mon, 16 Nov 2009)
Log Message:
-----------
Fix Normalize bug: ensure scalar output for scalar input.
This bug was causing a bug in clabel with a single contour level,
as reported by Brendan Arnold.
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-11-15 14:17:14 UTC (rev 7969)
+++ branches/v0_99_maint/lib/matplotlib/colors.py 2009-11-16 23:49:11 UTC (rev 7970)
@@ -765,7 +765,7 @@
if vmin > vmax:
raise ValueError("minvalue must be less than or equal to maxvalue")
elif vmin==vmax:
- return 0.0 * val
+ result = 0.0 * val
else:
if clip:
mask = ma.getmask(val)
@@ -826,7 +826,7 @@
elif vmin<=0:
raise ValueError("values must all be positive")
elif vmin==vmax:
- return 0.0 * val
+ result = 0.0 * val
else:
if clip:
mask = ma.getmask(val)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|