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

Skip to content

Commit 1b9abc9

Browse files
authored
Merge pull request #25713 from QuLogic/no-backend-print_figure
Remove print_figure overrides in backend subclasses
2 parents 5dca030 + 21e0a2e commit 1b9abc9

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

lib/matplotlib/backends/backend_qtagg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ def paintEvent(self, event):
7171
finally:
7272
painter.end()
7373

74-
def print_figure(self, *args, **kwargs):
75-
super().print_figure(*args, **kwargs)
76-
self.draw()
77-
7874

7975
@_BackendQT.export
8076
class _BackendQTAgg(_BackendQT):

lib/matplotlib/backends/backend_wx.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -614,15 +614,6 @@ def gui_repaint(self, drawDC=None):
614614
'xpm': 'X pixmap',
615615
}
616616

617-
def print_figure(self, filename, *args, **kwargs):
618-
# docstring inherited
619-
super().print_figure(filename, *args, **kwargs)
620-
# Restore the current view; this is needed because the artist contains
621-
# methods rely on particular attributes of the rendered figure for
622-
# determining things like bounding boxes.
623-
if self._isDrawn:
624-
self.draw()
625-
626617
def _on_paint(self, event):
627618
"""Called when wxPaintEvt is generated."""
628619
_log.debug("%s - _on_paint()", type(self))

0 commit comments

Comments
 (0)