Revision: 7070
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7070&view=rev
Author: jdh2358
Date: 2009-04-29 16:07:27 +0000 (Wed, 29 Apr 2009)
Log Message:
-----------
add masked array support to fill_between
Modified Paths:
--------------
trunk/matplotlib/examples/user_interfaces/embedding_in_gtk.py
trunk/matplotlib/examples/user_interfaces/embedding_in_gtk2.py
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/examples/user_interfaces/embedding_in_gtk.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/embedding_in_gtk.py
2009-04-29 15:28:33 UTC (rev 7069)
+++ trunk/matplotlib/examples/user_interfaces/embedding_in_gtk.py
2009-04-29 16:07:27 UTC (rev 7070)
@@ -10,8 +10,8 @@
from numpy import arange, sin, pi
# uncomment to select /GTK/GTKAgg/GTKCairo
-from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
-#from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as
FigureCanvas
+#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
+from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as
FigureCanvas
#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as
FigureCanvas
Modified: trunk/matplotlib/examples/user_interfaces/embedding_in_gtk2.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/embedding_in_gtk2.py
2009-04-29 15:28:33 UTC (rev 7069)
+++ trunk/matplotlib/examples/user_interfaces/embedding_in_gtk2.py
2009-04-29 16:07:27 UTC (rev 7070)
@@ -9,8 +9,8 @@
from numpy import arange, sin, pi
# uncomment to select /GTK/GTKAgg/GTKCairo
-from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
-#from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as
FigureCanvas
+#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
+from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as
FigureCanvas
#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as
FigureCanvas
# or NavigationToolbar for classic
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-04-29 15:28:33 UTC (rev
7069)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-04-29 16:07:27 UTC (rev
7070)
@@ -5832,6 +5832,26 @@
self._process_unit_info(xdata=x, ydata=y1, kwargs=kwargs)
self._process_unit_info(ydata=y2)
+ if where is None:
+ where = np.ones(len(x), np.bool)
+ else:
+ where = np.asarray(where)
+
+ maskedx = isinstance(x, np.ma.MaskedArray)
+ maskedy1 = isinstance(y1, np.ma.MaskedArray)
+ maskedy2 = isinstance(y2, np.ma.MaskedArray)
+
+ if (maskedx or maskedy1 or maskedy2):
+ if maskedx:
+ where = where & (~x.mask)
+
+ if maskedy1:
+ where = where & (~y1.mask)
+
+ if maskedy2:
+ where = where & (~y2.mask)
+
+
# Convert the arrays so we can work with them
x = np.asarray(self.convert_xunits(x))
y1 = np.asarray(self.convert_yunits(y1))
@@ -5843,10 +5863,7 @@
if not cbook.iterable(y2):
y2 = np.ones_like(x)*y2
- if where is None:
- where = np.ones(len(x), np.bool)
- where = np.asarray(where)
assert( (len(x)==len(y1)) and (len(x)==len(y2)) and len(x)==len(where))
polys = []
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins