Revision: 7016
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7016&view=rev
Author:   mdboom
Date:     2009-03-31 15:22:06 +0000 (Tue, 31 Mar 2009)

Log Message:
-----------
Fix bug when specifying both scale and label in the axes constructor.  Change 
to use new numpy putmask API.

Modified Paths:
--------------
    branches/v0_98_5_maint/lib/matplotlib/axes.py
    branches/v0_98_5_maint/lib/matplotlib/transforms.py

Modified: branches/v0_98_5_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axes.py       2009-03-31 15:13:24 UTC 
(rev 7015)
+++ branches/v0_98_5_maint/lib/matplotlib/axes.py       2009-03-31 15:22:06 UTC 
(rev 7016)
@@ -439,6 +439,8 @@
                  sharex=None, # use Axes instance's xaxis info
                  sharey=None, # use Axes instance's yaxis info
                  label='',
+                 xscale=None,
+                 yscale=None,
                  **kwargs
                  ):
         """
@@ -543,6 +545,11 @@
         self.set_navigate(True)
         self.set_navigate_mode(None)
 
+        if xscale:
+            self.set_xscale(xscale)
+        if yscale:
+            self.set_yscale(yscale)
+
         if len(kwargs): martist.setp(self, **kwargs)
 
         if self.xaxis is not None:

Modified: branches/v0_98_5_maint/lib/matplotlib/transforms.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 15:13:24 UTC 
(rev 7015)
+++ branches/v0_98_5_maint/lib/matplotlib/transforms.py 2009-03-31 15:22:06 UTC 
(rev 7016)
@@ -975,8 +975,7 @@
         if self._invalid:
             points = self._transform.transform(self._bbox.get_points())
             if ma.isMaskedArray(points):
-                points.putmask(0.0)
-                points = np.asarray(points)
+                np.putmask(points, points.mask, 0.0)
             self._points = points
             self._invalid = 0
         return self._points


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

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to