Skip to content

Unnecessary drawing with NbAgg #13971

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy