SF.net SVN: matplotlib:[8288] trunk/matplotlib/lib/matplotlib

2010-04-29 Thread mdboom
Revision: 8288
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8288&view=rev
Author:   mdboom
Date: 2010-04-29 16:18:09 + (Thu, 29 Apr 2010)

Log Message:
---
Fix bug with legends on non-linear scales. Reported by Shrividya Ravi.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/path.py
trunk/matplotlib/lib/matplotlib/transforms.py

Modified: trunk/matplotlib/lib/matplotlib/path.py
===
--- trunk/matplotlib/lib/matplotlib/path.py 2010-04-28 20:59:13 UTC (rev 
8287)
+++ trunk/matplotlib/lib/matplotlib/path.py 2010-04-29 16:18:09 UTC (rev 
8288)
@@ -292,9 +292,13 @@
 control points appropriately.
 """
 from transforms import Bbox
+path = self
 if transform is not None:
 transform = transform.frozen()
-return Bbox(get_path_extents(self, transform))
+if not transform.is_affine:
+path = self.transformed(transform)
+transform = None
+return Bbox(get_path_extents(path, transform))
 
 def intersects_path(self, other, filled=True):
 """
@@ -506,8 +510,8 @@
 def unit_circle_righthalf(cls):
 """
 (staticmethod) Returns a :class:`Path` of the right half
-of a unit circle. The circle is approximated using cubic Bezier 
-curves.  This uses 4 splines around the circle using the approach 
+of a unit circle. The circle is approximated using cubic Bezier
+curves.  This uses 4 splines around the circle using the approach
 presented here:
 
   Lancaster, Don.  `Approximating a Circle or an Ellipse Using Four
@@ -536,7 +540,7 @@
  [SQRTHALF-MAGIC45, SQRTHALF+MAGIC45],
  [MAGIC, 1.0],
  [0.0, 1.0],
-
+
  [0.0, -1.0]],
 
 np.float_)

Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===
--- trunk/matplotlib/lib/matplotlib/transforms.py   2010-04-28 20:59:13 UTC 
(rev 8287)
+++ trunk/matplotlib/lib/matplotlib/transforms.py   2010-04-29 16:18:09 UTC 
(rev 8288)
@@ -1066,7 +1066,7 @@
 """
 Used by C/C++ -based backends to get at the array matrix data.
 """
-return self.frozen().__array__()
+raise NotImplementedError
 
 def transform(self, values):
 """


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


SF.net SVN: matplotlib:[8289] trunk/matplotlib/lib/matplotlib/lines.py

2010-04-29 Thread efiring
Revision: 8289
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8289&view=rev
Author:   efiring
Date: 2010-04-29 21:43:53 + (Thu, 29 Apr 2010)

Log Message:
---
Line2D: don't use subslices with markevery

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/lines.py

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===
--- trunk/matplotlib/lib/matplotlib/lines.py2010-04-29 16:18:09 UTC (rev 
8288)
+++ trunk/matplotlib/lib/matplotlib/lines.py2010-04-29 21:43:53 UTC (rev 
8289)
@@ -456,7 +456,8 @@
 self._subslice = False
 if (self.axes and len(x) > 100 and self._is_sorted(x) and
 self.axes.name == 'rectilinear' and
-self.axes.get_xscale() == 'linear'):
+self.axes.get_xscale() == 'linear' and
+self._markevery is None):
 self._subslice = True
 if hasattr(self, '_path'):
 interpolation_steps = self._path._interpolation_steps


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