def _redraw(self):
"""
Redraw the plot and ask the widget to display the update.
"""
# Perform the redraw with the render lock held, preventing the graphics
# thread from trying to do a redraw at the same time.
self._renderLock.acquire()
try:
# NB: In matplotlib 0.99, if you call the canvas' draw() method
# directly, it immediately redraws the canvas, but sets replot
# to true, leading to another redraw when the update is handled
# by the graphics thread.
FigureCanvasAgg.draw(self._canvas)
self._canvas.replot = False
self._canvas.update()
finally:
self._renderLock.release()
评论列表
文章目录