|
From: <md...@us...> - 2010-04-29 16:18:15
|
Revision: 8288
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8288&view=rev
Author: mdboom
Date: 2010-04-29 16:18:09 +0000 (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.
|