4343
4444import matplotlib as mpl
4545from matplotlib import (
46- _api , backend_tools as tools , cbook , colors , _docstring , textpath ,
46+ _api , backend_tools as tools , cbook , colors , _docstring , text ,
4747 _tight_bbox , transforms , widgets , get_backend , is_interactive , rcParams )
4848from matplotlib ._pylab_helpers import Gcf
4949from matplotlib .backend_managers import ToolManager
@@ -172,7 +172,7 @@ class RendererBase:
172172 def __init__ (self ):
173173 super ().__init__ ()
174174 self ._texmanager = None
175- self ._text2path = textpath .TextToPath ()
175+ self ._text2path = text .TextToPath ()
176176 self ._raster_depth = 0
177177 self ._rasterizing = False
178178
@@ -515,7 +515,7 @@ def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None):
515515 The y location of the text baseline in display coords.
516516 s : str
517517 The TeX text string.
518- prop : `matplotlib.font_manager.FontProperties`
518+ prop : `~ matplotlib.font_manager.FontProperties`
519519 The font properties.
520520 angle : float
521521 The rotation angle in degrees anti-clockwise.
@@ -538,12 +538,12 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
538538 The y location of the text baseline in display coords.
539539 s : str
540540 The text string.
541- prop : `matplotlib.font_manager.FontProperties`
541+ prop : `~ matplotlib.font_manager.FontProperties`
542542 The font properties.
543543 angle : float
544544 The rotation angle in degrees anti-clockwise.
545545 ismath : bool or "TeX"
546- If True, use mathtext parser. If "TeX", use *usetex* mode .
546+ If True, use mathtext parser. If "TeX", use tex for rendering .
547547 mtext : `matplotlib.text.Text`
548548 The original text object to be rendered.
549549
@@ -569,12 +569,18 @@ def _get_text_path_transform(self, x, y, s, prop, angle, ismath):
569569
570570 Parameters
571571 ----------
572- prop : `matplotlib.font_manager.FontProperties`
573- The font property.
572+ x : float
573+ The x location of the text in display coords.
574+ y : float
575+ The y location of the text baseline in display coords.
574576 s : str
575577 The text to be converted.
578+ prop : `~matplotlib.font_manager.FontProperties`
579+ The font property.
580+ angle : float
581+ Angle in degrees to render the text at.
576582 ismath : bool or "TeX"
577- If True, use mathtext parser. If "TeX", use *usetex* mode .
583+ If True, use mathtext parser. If "TeX", use tex for rendering .
578584 """
579585
580586 text2path = self ._text2path
@@ -599,18 +605,22 @@ def _get_text_path_transform(self, x, y, s, prop, angle, ismath):
599605
600606 def _draw_text_as_path (self , gc , x , y , s , prop , angle , ismath ):
601607 """
602- Draw the text by converting them to paths using textpath module .
608+ Draw the text by converting them to paths using `.TextToPath` .
603609
604610 Parameters
605611 ----------
606- prop : `matplotlib.font_manager.FontProperties`
607- The font property.
612+ x : float
613+ The x location of the text in display coords.
614+ y : float
615+ The y location of the text baseline in display coords.
608616 s : str
609617 The text to be converted.
610- usetex : bool
611- Whether to use usetex mode.
618+ prop : `~matplotlib.font_manager.FontProperties`
619+ The font property.
620+ angle : float
621+ Angle in degrees to render the text at.
612622 ismath : bool or "TeX"
613- If True, use mathtext parser. If "TeX", use *usetex* mode .
623+ If True, use mathtext parser. If "TeX", use tex for rendering .
614624 """
615625 path , transform = self ._get_text_path_transform (
616626 x , y , s , prop , angle , ismath )
0 commit comments