21
21
from matplotlib .cbook import is_string_like , maxdict
22
22
from matplotlib import docstring
23
23
from matplotlib .font_manager import FontProperties
24
- from matplotlib .patches import YAArrow , FancyBboxPatch
24
+ from matplotlib .patches import FancyBboxPatch
25
25
from matplotlib .patches import FancyArrowPatch , Rectangle
26
26
import matplotlib .transforms as mtransforms
27
27
from matplotlib .transforms import Affine2D , Bbox , Transform
@@ -531,7 +531,7 @@ def update_bbox_position_size(self, renderer):
531
531
posx , posy = trans .transform_point ((posx , posy ))
532
532
533
533
x_box , y_box , w_box , h_box = _get_textbox (self , renderer ,
534
- with_descent = False )
534
+ with_descent = True )
535
535
self ._bbox_patch .set_bounds (0. , 0. , w_box , h_box )
536
536
theta = np .deg2rad (self .get_rotation ())
537
537
tr = mtransforms .Affine2D ().rotate (theta )
@@ -548,7 +548,7 @@ def _draw_bbox(self, renderer, posx, posy):
548
548
"""
549
549
550
550
x_box , y_box , w_box , h_box = _get_textbox (self , renderer ,
551
- with_descent = False )
551
+ with_descent = True )
552
552
self ._bbox_patch .set_bounds (0. , 0. , w_box , h_box )
553
553
theta = np .deg2rad (self .get_rotation ())
554
554
tr = mtransforms .Affine2D ().rotate (theta )
@@ -558,7 +558,6 @@ def _draw_bbox(self, renderer, posx, posy):
558
558
self ._bbox_patch .set_mutation_scale (fontsize_in_pixel )
559
559
self ._bbox_patch .draw (renderer )
560
560
561
-
562
561
def _update_clip_properties (self ):
563
562
clipprops = dict (clip_box = self .clipbox ,
564
563
clip_path = self ._clippath ,
@@ -2114,7 +2113,6 @@ def _update_position_xytext(self, renderer, xy_pixel):
2114
2113
self .set_transform (self ._get_xy_transform (
2115
2114
renderer , self .xy , self .anncoords ))
2116
2115
2117
-
2118
2116
ox0 , oy0 = self ._get_xy_display ()
2119
2117
ox1 , oy1 = xy_pixel
2120
2118
@@ -2172,7 +2170,6 @@ def _update_position_xytext(self, renderer, xy_pixel):
2172
2170
self .arrow_patch .shrinkA = shrink_pts
2173
2171
self .arrow_patch .shrinkB = shrink_pts
2174
2172
2175
-
2176
2173
# adjust the starting point of the arrow relative to
2177
2174
# the textbox.
2178
2175
# TODO : Rotation needs to be accounted.
@@ -2243,7 +2240,6 @@ def draw(self, renderer):
2243
2240
# Otherwise, a wedge arrowstyle can land partly on top of the Bbox.
2244
2241
Text .draw (self , renderer )
2245
2242
2246
-
2247
2243
def get_window_extent (self , renderer = None ):
2248
2244
'''
2249
2245
Return a :class:`~matplotlib.transforms.Bbox` object bounding
0 commit comments