From 3a4d5041b97d3320e466d402c485ca939daf8283 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 11 Apr 2019 11:31:17 +0200 Subject: [PATCH] Followup to deprecation of usetex parameter in get_text_path. This is in particular necessary to avoid triggering a deprecation warning in test_backend_ps::test_patheffects. --- 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 b8e6d253414b..123ad09481d0 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