2121from matplotlib .cbook import is_string_like , maxdict
2222from matplotlib import docstring
2323from matplotlib .font_manager import FontProperties
24- from matplotlib .patches import YAArrow , FancyBboxPatch
24+ from matplotlib .patches import FancyBboxPatch
2525from matplotlib .patches import FancyArrowPatch , Rectangle
2626import matplotlib .transforms as mtransforms
2727from matplotlib .transforms import Affine2D , Bbox , Transform
@@ -531,7 +531,7 @@ def update_bbox_position_size(self, renderer):
531531 posx , posy = trans .transform_point ((posx , posy ))
532532
533533 x_box , y_box , w_box , h_box = _get_textbox (self , renderer ,
534- with_descent = False )
534+ with_descent = True )
535535 self ._bbox_patch .set_bounds (0. , 0. , w_box , h_box )
536536 theta = np .deg2rad (self .get_rotation ())
537537 tr = mtransforms .Affine2D ().rotate (theta )
@@ -548,7 +548,7 @@ def _draw_bbox(self, renderer, posx, posy):
548548 """
549549
550550 x_box , y_box , w_box , h_box = _get_textbox (self , renderer ,
551- with_descent = False )
551+ with_descent = True )
552552 self ._bbox_patch .set_bounds (0. , 0. , w_box , h_box )
553553 theta = np .deg2rad (self .get_rotation ())
554554 tr = mtransforms .Affine2D ().rotate (theta )
@@ -558,7 +558,6 @@ def _draw_bbox(self, renderer, posx, posy):
558558 self ._bbox_patch .set_mutation_scale (fontsize_in_pixel )
559559 self ._bbox_patch .draw (renderer )
560560
561-
562561 def _update_clip_properties (self ):
563562 clipprops = dict (clip_box = self .clipbox ,
564563 clip_path = self ._clippath ,
@@ -2114,7 +2113,6 @@ def _update_position_xytext(self, renderer, xy_pixel):
21142113 self .set_transform (self ._get_xy_transform (
21152114 renderer , self .xy , self .anncoords ))
21162115
2117-
21182116 ox0 , oy0 = self ._get_xy_display ()
21192117 ox1 , oy1 = xy_pixel
21202118
@@ -2172,7 +2170,6 @@ def _update_position_xytext(self, renderer, xy_pixel):
21722170 self .arrow_patch .shrinkA = shrink_pts
21732171 self .arrow_patch .shrinkB = shrink_pts
21742172
2175-
21762173 # adjust the starting point of the arrow relative to
21772174 # the textbox.
21782175 # TODO : Rotation needs to be accounted.
@@ -2243,7 +2240,6 @@ def draw(self, renderer):
22432240 # Otherwise, a wedge arrowstyle can land partly on top of the Bbox.
22442241 Text .draw (self , renderer )
22452242
2246-
22472243 def get_window_extent (self , renderer = None ):
22482244 '''
22492245 Return a :class:`~matplotlib.transforms.Bbox` object bounding
0 commit comments