Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a69d48e

Browse files
authored
Merge pull request #13946 from meeseeksmachine/auto-backport-of-pr-13924-on-v3.1.x
Backport PR #13924 on branch v3.1.x (Followup to deprecation of usetex parameter in get_text_path.)
2 parents c187867 + 53b31ad commit a69d48e

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,7 @@ def _get_text_path_transform(self, x, y, s, prop, angle, ismath):
564564

565565
text2path = self._text2path
566566
fontsize = self.points_to_pixels(prop.get_size_in_points())
567-
568-
if ismath == "TeX":
569-
verts, codes = text2path.get_text_path(prop, s, ismath=False,
570-
usetex=True)
571-
else:
572-
verts, codes = text2path.get_text_path(prop, s, ismath=ismath,
573-
usetex=False)
567+
verts, codes = text2path.get_text_path(prop, s, ismath=ismath)
574568

575569
path = Path(verts, codes)
576570
angle = np.deg2rad(angle)

lib/matplotlib/textpath.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,8 @@ def __init__(self, xy, s, size=None, prop=None,
463463

464464
self._cached_vertices = None
465465
s, ismath = Text(usetex=usetex)._preprocess_math(s)
466-
if ismath == "TeX":
467-
self._vertices, self._codes = text_to_path.get_text_path(
468-
prop, s, usetex=True)
469-
else:
470-
self._vertices, self._codes = text_to_path.get_text_path(
471-
prop, s, ismath=ismath)
466+
self._vertices, self._codes = text_to_path.get_text_path(
467+
prop, s, ismath=ismath)
472468
self._should_simplify = False
473469
self._simplify_threshold = rcParams['path.simplify_threshold']
474470
self._interpolation_steps = _interpolation_steps

0 commit comments

Comments
 (0)