Description
Performance issue
Summary
SInce I updated to matplotlib 3.3.1 (latest available for the Anaconda distribution), my interactive plots (with sliders and buttons) have become very slow.
I look at the evolution with time of the solution of a one-dimensional PDE. I typically use a slider to choose the time at which the solution profile is to be plotted. When the slider is updated, all the plotted lines are updated with the new solution profile (via the set_ydata function). This worked fine with matplotlib 3.2.2.
It's got at least 10 times slower with 3.3.1. To see where the problem comes from, I tried gradually removing every update of the plotted curves, so that in the end the update function that is called on a slider value change is simply:
def update(slider_value):
pass
In this case, the execution time should be totally independent of my code. But it actually does not improve the performance, I still need to wait up to 3 seconds before the figure is actually updated, even though literally nothing changes...
Do you know what might cause the issue ? In the meantime I simply reverted back to 3.2.2.
Thanks for your help !