Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce36f80

Browse files
committed
fix axes_grid for offsetbox api change
svn path=/trunk/matplotlib/; revision=8104
1 parent 4d46fec commit ce36f80

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/offsetbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ def _update_offset_func(self, renderer, fontsize=None):
958958
if fontsize is None:
959959
fontsize = renderer.points_to_pixels(self.prop.get_size_in_points())
960960

961-
def _offset(w, h, xd, yd, fontsize=fontsize, self=self):
961+
def _offset(w, h, xd, yd, renderer, fontsize=fontsize, self=self):
962962
bbox = Bbox.from_bounds(0, 0, w, h)
963963
borderpad = self.borderpad*fontsize
964964
bbox_to_anchor = self.get_bbox_to_anchor()

lib/mpl_toolkits/axes_grid/inset_locator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __call__(self, ax, renderer):
4747

4848
width, height, xdescent, ydescent = self.get_extent(renderer)
4949

50-
px, py = self.get_offset(width, height, 0, 0)
50+
px, py = self.get_offset(width, height, 0, 0, renderer)
5151
bbox_canvas = mtrans.Bbox.from_bounds(px, py, width, height)
5252
tr = ax.figure.transFigure.inverted()
5353
bb = mtrans.TransformedBbox(bbox_canvas, tr)

0 commit comments

Comments
 (0)