Skip to content

"Configure subplots" tool is initialized very inefficiently in the Qt backends #6058

Closed
@anntzer

Description

@anntzer

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions