Skip to content

Commit a1caf12

Browse files
AASMA GUPTAAASMA GUPTA
authored andcommitted
Fix SVG rendering error in _setup_plot_projector
1 parent c6557c6 commit a1caf12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/widgets.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,6 +2172,11 @@ def update_background(self, event):
21722172
# `release` can call a draw event even when `ignore` is True.
21732173
if not self.useblit:
21742174
return
2175+
# Skip blitting if we are saving to disk or if the backend doesn’t support it
2176+
if getattr(self.canvas, "_is_saving", False):
2177+
return
2178+
if not hasattr(self.canvas, "copy_from_bbox"):
2179+
return
21752180
# Make sure that widget artists don't get accidentally included in the
21762181
# background, by re-rendering the background if needed (and then
21772182
# re-re-rendering the canvas with the visible widget artists).

0 commit comments

Comments
 (0)