I was checking the performance of the GtkAgg and Qt4Agg backends and noticed that the Qt4Agg backend calls canvas.draw 3 times for every pylab.show()
The three calls are:
FigureCanvasQTAgg.paintEvent -> FigureCanvasAgg.draw(self)
show() in backend_qt4.py includes the extra call to figManager.canvas.draw compared to the gtk backend. It doesn’t seem to be necessary.
There is a ‘replot’ flag in the canvas.draw function in FigureCanvasQTAgg which looks as though it should be True in order to prevent the extra draw in paintEvent.