@@ -367,7 +367,8 @@ def get_bbox_patch(self):
367367
368368
369369 def update_bbox_position_size (self , renderer ):
370- """ Update the location and the size of the bbox. This method
370+ """
371+ Update the location and the size of the bbox. This method
371372 should be used when the position and size of the bbox needs to
372373 be updated before actually drawing the bbox.
373374 """
@@ -395,8 +396,8 @@ def update_bbox_position_size(self, renderer):
395396 tr = mtransforms .Affine2D ().rotate (theta )
396397 tr = tr .translate (posx + x_box , posy + y_box )
397398 self ._bbox_patch .set_transform (tr )
398- fontsize = renderer .points_to_pixels (self .get_size ())
399- self ._bbox_patch .set_mutation_scale (fontsize )
399+ fontsize_in_pixel = renderer .points_to_pixels (self .get_size ())
400+ self ._bbox_patch .set_mutation_scale (fontsize_in_pixel )
400401 #self._bbox_patch.draw(renderer)
401402
402403 else :
@@ -434,7 +435,8 @@ def _draw_bbox(self, renderer, posx, posy):
434435 tr = mtransforms .Affine2D ().rotate (theta )
435436 tr = tr .translate (posx + x_box , posy + y_box )
436437 self ._bbox_patch .set_transform (tr )
437- self ._bbox_patch .set_mutation_scale (self .get_size ())
438+ fontsize_in_pixel = renderer .points_to_pixels (self .get_size ())
439+ self ._bbox_patch .set_mutation_scale (fontsize_in_pixel )
438440 self ._bbox_patch .draw (renderer )
439441
440442
@@ -1557,6 +1559,7 @@ def update_positions(self, renderer):
15571559
15581560 self .arrow_patch .set_positions ((ox0 , oy0 ), (ox1 ,oy1 ))
15591561 mutation_scale = d .pop ("mutation_scale" , self .get_size ())
1562+ mutation_scale = renderer .points_to_pixels (mutation_scale )
15601563 self .arrow_patch .set_mutation_scale (mutation_scale )
15611564
15621565 if self ._bbox_patch :
0 commit comments