From 53b31ade0280f75ca9f605fc2ed025dd5e08cceb Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sat, 13 Apr 2019 16:36:18 +0200 Subject: [PATCH] Backport PR #13924: Followup to deprecation of usetex parameter in get_text_path. --- lib/matplotlib/backend_bases.py | 8 +------- lib/matplotlib/textpath.py | 8 ++------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py index cc60b230b3f5..04541c386521 100644 --- a/lib/matplotlib/backend_bases.py +++ b/lib/matplotlib/backend_bases.py @@ -564,13 +564,7 @@ def _get_text_path_transform(self, x, y, s, prop, angle, ismath): text2path = self._text2path fontsize = self.points_to_pixels(prop.get_size_in_points()) - - if ismath == "TeX": - verts, codes = text2path.get_text_path(prop, s, ismath=False, - usetex=True) - else: - verts, codes = text2path.get_text_path(prop, s, ismath=ismath, - usetex=False) + verts, codes = text2path.get_text_path(prop, s, ismath=ismath) path = Path(verts, codes) angle = np.deg2rad(angle) diff --git a/lib/matplotlib/textpath.py b/lib/matplotlib/textpath.py index c02fe3a72aa5..ae289f35f8f6 100644 --- a/lib/matplotlib/textpath.py +++ b/lib/matplotlib/textpath.py @@ -463,12 +463,8 @@ def __init__(self, xy, s, size=None, prop=None, self._cached_vertices = None s, ismath = Text(usetex=usetex)._preprocess_math(s) - if ismath == "TeX": - self._vertices, self._codes = text_to_path.get_text_path( - prop, s, usetex=True) - else: - self._vertices, self._codes = text_to_path.get_text_path( - prop, s, ismath=ismath) + self._vertices, self._codes = text_to_path.get_text_path( + prop, s, ismath=ismath) self._should_simplify = False self._simplify_threshold = rcParams['path.simplify_threshold'] self._interpolation_steps = _interpolation_steps pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy