New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-interactive backend calls draw more than 100 times #4780
Comments
Could this possibly be addressed by #4738? On Fri, Jul 24, 2015 at 5:54 AM, mdehoon notifications@github.com wrote:
|
It is fixed by #4738 which is now a couple of changes merged together. |
With 1.5.0, the example above before the call to savefig causes five calls to Figure.draw. |
This is because If you turn interactive mode off you will not get the extra draws (as the hook isn't installed) or if you run this in IPython (as we use their post execute hooks to get the asynchronous draw instead of relying on the backends to provide it) you will not get the extra draws. The svg and pdf backends don't have a functional Maybe we should raise when interactive mode is enabled with non-interactive backends, but that seems like a lot of extra complication for not much payoff. I am in favor of closing this issue as I don't think we can do better than this in the case where
|
I don't have a strong opinion on this matter. I'm OK with closing this issue. |
This code:
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.
The text was updated successfully, but these errors were encountered: