Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c27970c + 16baab9 commit 6b429c9Copy full SHA for 6b429c9
1 file changed
lib/matplotlib/backends/backend_qt5agg.py
@@ -75,7 +75,11 @@ def paintEvent(self, e):
75
In Qt, all drawing should be done inside of here when a widget is
76
shown onscreen.
77
"""
78
- # FigureCanvasQT.paintEvent(self, e)
+ # if the canvas does not have a renderer, then give up and wait for
79
+ # FigureCanvasAgg.draw(self) to be called
80
+ if not hasattr(self, 'renderer'):
81
+ return
82
+
83
if DEBUG:
84
print('FigureCanvasQtAgg.paintEvent: ', self,
85
self.get_width_height())
0 commit comments