Queue redraw of the Agg buffer and request Qt paintEvent.
(self)
| 492 | self.update() |
| 493 | |
| 494 | def draw_idle(self): |
| 495 | """Queue redraw of the Agg buffer and request Qt paintEvent.""" |
| 496 | # The Agg draw needs to be handled by the same thread Matplotlib |
| 497 | # modifies the scene graph from. Post Agg draw request to the |
| 498 | # current event loop in order to ensure thread affinity and to |
| 499 | # accumulate multiple draw requests from event handling. |
| 500 | # TODO: queued signal connection might be safer than singleShot |
| 501 | if not (getattr(self, '_draw_pending', False) or |
| 502 | getattr(self, '_is_drawing', False)): |
| 503 | self._draw_pending = True |
| 504 | QtCore.QTimer.singleShot(0, self._draw_idle) |
| 505 | |
| 506 | def blit(self, bbox=None): |
| 507 | # docstring inherited |
no outgoing calls