@@ -731,57 +731,57 @@ def draw(self, renderer):
731
731
732
732
renderer .open_group ('text' ,self .get_gid ())
733
733
734
- with _wrap_text (self )as self :
735
- bbox ,info ,descent = self ._get_layout (renderer )
736
- trans = self .get_transform ()
734
+ with _wrap_text (self )as textobj :
735
+ bbox ,info ,descent = textobj ._get_layout (renderer )
736
+ trans = textobj .get_transform ()
737
737
738
- # don't useself .get_position here, which refers to text position
739
- # in Text, and dash position in TextWithDash:
740
- posx = float (self .convert_xunits (self ._x ))
741
- posy = float (self .convert_yunits (self ._y ))
738
+ # don't usetextobj .get_position here, which refers to text
739
+ #position in Text, and dash position in TextWithDash:
740
+ posx = float (textobj .convert_xunits (textobj ._x ))
741
+ posy = float (textobj .convert_yunits (textobj ._y ))
742
742
743
743
posx ,posy = trans .transform_point ((posx ,posy ))
744
744
canvasw ,canvash = renderer .get_canvas_width_height ()
745
745
746
746
# draw the FancyBboxPatch
747
- if self ._bbox_patch :
748
- self ._draw_bbox (renderer ,posx ,posy )
747
+ if textobj ._bbox_patch :
748
+ textobj ._draw_bbox (renderer ,posx ,posy )
749
749
750
750
gc = renderer .new_gc ()
751
- gc .set_foreground (self .get_color ())
752
- gc .set_alpha (self .get_alpha ())
753
- gc .set_url (self ._url )
754
- self ._set_gc_clip (gc )
751
+ gc .set_foreground (textobj .get_color ())
752
+ gc .set_alpha (textobj .get_alpha ())
753
+ gc .set_url (textobj ._url )
754
+ textobj ._set_gc_clip (gc )
755
755
756
- if self ._bbox :
757
- bbox_artist (self ,renderer ,self ._bbox )
758
- angle = self .get_rotation ()
756
+ if textobj ._bbox :
757
+ bbox_artist (textobj ,renderer ,textobj ._bbox )
758
+ angle = textobj .get_rotation ()
759
759
760
760
for line ,wh ,x ,y in info :
761
761
if not np .isfinite (x )or not np .isfinite (y ):
762
762
continue
763
763
764
- mtext = self if len (info )== 1 else None
764
+ mtext = textobj if len (info )== 1 else None
765
765
x = x + posx
766
766
y = y + posy
767
767
if renderer .flipy ():
768
768
y = canvash - y
769
- clean_line ,ismath = self .is_math_text (line )
769
+ clean_line ,ismath = textobj .is_math_text (line )
770
770
771
- if self .get_path_effects ():
771
+ if textobj .get_path_effects ():
772
772
from matplotlib .patheffects import PathEffectRenderer
773
- textrenderer = PathEffectRenderer (self . get_path_effects (),
774
- renderer )
773
+ textrenderer = PathEffectRenderer (
774
+ textobj . get_path_effects (), renderer )
775
775
else :
776
776
textrenderer = renderer
777
777
778
- if self .get_usetex ():
778
+ if textobj .get_usetex ():
779
779
textrenderer .draw_tex (gc ,x ,y ,clean_line ,
780
- self ._fontproperties ,angle ,
780
+ textobj ._fontproperties ,angle ,
781
781
mtext = mtext )
782
782
else :
783
783
textrenderer .draw_text (gc ,x ,y ,clean_line ,
784
- self ._fontproperties ,angle ,
784
+ textobj ._fontproperties ,angle ,
785
785
ismath = ismath ,mtext = mtext )
786
786
787
787
gc .restore ()