Description
I am running into performance issues when using the NbAgg backend, some of which I think is avoidable. Essentially, when clicking on an NbAgg plot, with no tool active, the backend re-draws the data, which can cause the kernel to hang if the plot is complex. Here is a demonstration - note the kernel activity in the circle in the top right. Every time I click on the plot, it is redrawn:
Just to be clear, I totally expect plotting to be slow the first time the plot is shown, and if e.g. panning/zooming, but drawing when no tool is active doesn't seem right. This is causing issues for me because I am developing tools that respond to a click event in the plot and try and be nice by doing draw_idle
to keep the UI responsive, but every mouse action also results in a full draw
which slows things down a lot.
Matplotlib version
- Operating system: MacOS X 10.14.2
- Matplotlib version: latest dev (557cdfa)
- Matplotlib backend (
print(matplotlib.get_backend())
): NbAgg - Python version: 3.7.1
- Jupyter version (if applicable): 4.4.0