Revision: 6497 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6497&view=rev Author: ryanmay Date: 2008-12-05 15:56:26 +0000 (Fri, 05 Dec 2008)
Log Message: ----------- Add support for data with units to Axes.fill_between(). Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-12-05 14:48:45 UTC (rev 6496) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-12-05 15:56:26 UTC (rev 6497) @@ -5578,7 +5578,15 @@ %(PolyCollection)s """ - x = np.asarray(x) + # Handle united data, such as dates + self._process_unit_info(xdata=x, ydata=y1, kwargs=kwargs) + self._process_unit_info(ydata=y2) + + # Convert the arrays so we can work with them + x = np.asarray(self.convert_xunits(x)) + y1 = np.asarray(self.convert_yunits(y1)) + y2 = np.asarray(self.convert_yunits(y2)) + if not cbook.iterable(y1): y1 = np.ones_like(x)*y1 @@ -5588,8 +5596,6 @@ if where is None: where = np.ones(len(x), np.bool) - y1 = np.asarray(y1) - y2 = np.asarray(y2) where = np.asarray(where) assert( (len(x)==len(y1)) and (len(x)==len(y2)) and len(x)==len(where)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins