@@ -1301,11 +1301,11 @@ def _update_position_xybox(self, renderer, xy_pixel):
13011301 x , y = self .xytext
13021302 if isinstance (self .textcoords , tuple ):
13031303 xcoord , ycoord = self .textcoords
1304- x1 , y1 = self ._get_xy (x , y , xcoord )
1305- x2 , y2 = self ._get_xy (x , y , ycoord )
1304+ x1 , y1 = self ._get_xy (renderer , x , y , xcoord )
1305+ x2 , y2 = self ._get_xy (renderer , x , y , ycoord )
13061306 ox0 , oy0 = x1 , y2
13071307 else :
1308- ox0 , oy0 = self ._get_xy (x , y , self .textcoords )
1308+ ox0 , oy0 = self ._get_xy (renderer , x , y , self .textcoords )
13091309
13101310 #self.offsetbox.set_bbox_to_anchor((ox0, oy0))
13111311 w , h , xd , yd = self .offsetbox .get_extent (renderer )
@@ -1526,11 +1526,11 @@ def save_offset(self):
15261526 x , y = ann .xytext
15271527 if isinstance (ann .textcoords , tuple ):
15281528 xcoord , ycoord = ann .textcoords
1529- x1 , y1 = ann ._get_xy (x , y , xcoord )
1530- x2 , y2 = ann ._get_xy (x , y , ycoord )
1529+ x1 , y1 = ann ._get_xy (self . canvas . renderer , x , y , xcoord )
1530+ x2 , y2 = ann ._get_xy (self . canvas . renderer , x , y , ycoord )
15311531 ox0 , oy0 = x1 , y2
15321532 else :
1533- ox0 , oy0 = ann ._get_xy (x , y , ann .textcoords )
1533+ ox0 , oy0 = ann ._get_xy (self . canvas . renderer , x , y , ann .textcoords )
15341534
15351535 self .ox , self .oy = ox0 , oy0
15361536 self .annotation .textcoords = "figure pixels"
@@ -1539,7 +1539,7 @@ def update_offset(self, dx, dy):
15391539 ann = self .annotation
15401540 ann .xytext = self .ox + dx , self .oy + dy
15411541 x , y = ann .xytext
1542- xy = ann ._get_xy (x , y , ann .textcoords )
1542+ xy = ann ._get_xy (self . canvas . renderer , x , y , ann .textcoords )
15431543
15441544 def finalize_offset (self ):
15451545 loc_in_canvas = self .annotation .xytext
0 commit comments