Closed
Description
Instrument fig.canvas.draw
as follows:
from pylab import *
fig, ax = subplots()
__old_draw = fig.canvas.draw
def draw():
print("drawing")
__old_draw()
fig.canvas.draw = draw
show()
Clicking on the "configure subplots" button shows that in the Qt backends even without touching the sliders, the figure is redrawn 8(!) times just by the time the dialog is created (probably once for each slider initialization). As a comparison, the Tk backend does not redraw the figure once.
This is rather annoying when working with slow-to-draw figures, e.g. plt.plot(np.random.rand(1e5))
.
python 3.5.1, matplotlib 1.5.1