Revision: 7947
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7947&view=rev
Author: leejjoon
Date: 2009-11-06 22:33:34 +0000 (Fri, 06 Nov 2009)
Log Message:
-----------
axes_grid: add HostAxes.get_tightbbox
Modified Paths:
--------------
trunk/matplotlib/lib/mpl_toolkits/axes_grid/parasite_axes.py
Modified: trunk/matplotlib/lib/mpl_toolkits/axes_grid/parasite_axes.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/parasite_axes.py 2009-11-06 21:54:57 UTC (rev 7946)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/parasite_axes.py 2009-11-06 22:33:34 UTC (rev 7947)
@@ -10,6 +10,8 @@
from matplotlib.axes import subplot_class_factory
from axislines import Axes
+from matplotlib.transforms import Bbox
+
import numpy as np
import matplotlib.cbook as cbook
@@ -238,6 +240,16 @@
return self.legend_
+ def get_tightbbox(self, renderer):
+
+ bbs = [ax.get_tightbbox(renderer) for ax in self.parasites]
+ bbs.append(super(HostAxes, self).get_tightbbox(renderer))
+
+ _bbox = Bbox.union([b for b in bbs if b.width!=0 or b.height!=0])
+
+ return _bbox
+
+
def draw(self, renderer):
orig_artists = list(self.artists)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|