Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3f62859

Browse filesBrowse files
committed
BUG: Fixes a bug in the text draw method where the input renderer was being overwritten when path_effects are set
1 parent 4f80cfd commit 3f62859
Copy full SHA for 3f62859

File tree

Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -639,16 +639,18 @@ def draw(self, renderer):
639639

640640
if self.get_path_effects():
641641
from matplotlib.patheffects import PathEffectRenderer
642-
renderer = PathEffectRenderer(self.get_path_effects(),
643-
renderer)
642+
textrenderer = PathEffectRenderer(self.get_path_effects(),
643+
renderer)
644+
else:
645+
textrenderer = renderer
644646

645647
if self.get_usetex():
646-
renderer.draw_tex(gc, x, y, clean_line,
647-
self._fontproperties, angle, mtext=mtext)
648+
textrenderer.draw_tex(gc, x, y, clean_line,
649+
self._fontproperties, angle, mtext=mtext)
648650
else:
649-
renderer.draw_text(gc, x, y, clean_line,
650-
self._fontproperties, angle,
651-
ismath=ismath, mtext=mtext)
651+
textrenderer.draw_text(gc, x, y, clean_line,
652+
self._fontproperties, angle,
653+
ismath=ismath, mtext=mtext)
652654

653655
gc.restore()
654656
renderer.close_group('text')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.