8000 Unnecessary drawing with NbAgg · Issue #13971 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Unnecessary drawing with NbAgg #13971
Closed
@astrofrog

Description

@astrofrog

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:

Screen-Recording-2019-04-16-at-11 13 08

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0