diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index 26a2f9cd1432..a1c1db33116e 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -503,6 +503,24 @@ def option_scale_image(self): def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None): """ + Draw a TeX instance. + + Parameters + ---------- + gc : `.GraphicsContextBase` + The graphics context. + x : float + The x location of the text in display coords. + y : float + The y location of the text baseline in display coords. + s : str + The TeX text string. + prop : `matplotlib.font_manager.FontProperties` + The font properties. + angle : float + The rotation angle in degrees anti-clockwise. + mtext : `matplotlib.text.Text` + The original text object to be rendered. """ self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX") diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index c3b900a97399..4012526e5e3c 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -693,9 +693,9 @@ def draw_image(self, gc, x, y, im, transform=None): interp, w, h, fname_img)) _writeln(self.fh, r"\end{pgfscope}") - def draw_tex(self, gc, x, y, s, prop, angle, ismath="TeX", mtext=None): + def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None): # docstring inherited - self.draw_text(gc, x, y, s, prop, angle, ismath, mtext) + self.draw_text(gc, x, y, s, prop, angle, ismath="TeX", mtext=mtext) def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): # docstring inherited diff --git a/lib/matplotlib/backends/backend_svg.py b/lib/matplotlib/backends/backend_svg.py index 9d714739c081..07238fe076a3 100644 --- a/lib/matplotlib/backends/backend_svg.py +++ b/lib/matplotlib/backends/backend_svg.py @@ -1292,10 +1292,6 @@ def _get_all_quoted_names(prop): writer.end('g') - def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None): - # docstring inherited - self._draw_text_as_path(gc, x, y, s, prop, angle, ismath="TeX") - def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None): # docstring inherited