Non-interactive backend calls draw more than 100 times · Issue #4780 · matplotlib/matplotlib · GitHub
Skip to content

Non-interactive backend calls draw more than 100 times #4780

Description

@mdehoon

This code:

import matplotlib
matplotlib.use('agg')
from pylab import *
plot([1,2,5])
savefig("test")

causes Figure.draw to be called 155 times with the code currently in master.
With matplotlib 1.4.3, Figure.draw is called twice (once to create the PNG, and once to redraw the figure).
I am guessing that this has to do with the default implementation of draw_idle in FigureCanvasBase. Currently it calls draw().
So then if I change a property of the figure, the figure gets marked as stale, draw_idle is called, draw_idle calls draw, which resets the figure as non-stale.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions