Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Speed up canvas redraw for GTK3Agg backend.#12030

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 2 commits intomatplotlib:masterfromakhilman:speed-up-gtk3agg-redraw
Sep 19, 2018
Merged

Speed up canvas redraw for GTK3Agg backend.#12030

QuLogic merged 2 commits intomatplotlib:masterfromakhilman:speed-up-gtk3agg-redraw
Sep 19, 2018

Conversation

akhilman
Copy link
Contributor

PR Summary

Move_render_figure() call out ofon_draw_event handler
inFigureCanvasGTK3Agg class and call it from overloaded
draw() method.
Fixes#12010

Gtk triggersdraw event not only when actual plot redraw
required but also when any another widget drawn over canvas.
This makes application with embided plot unresponsive in cases
when popover or popup menu are drawn over plot.
You may try example provided in#12010.

Moving actual plot redraw out ofon_draw_event() makes GUI
much more responsive.

This changes tested with:

  • animation from examples/ directory
  • interacive pan and zoom
  • cursor widget with bliting
  • calling draw_idle() to update interactive chart

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Move `_render_figure()` call out of `on_draw_event` handlerin `FigureCanvasGTK3Agg` class and call it from overloaded`draw()` method.Fixes#12010Gtk triggers `draw` event not only when actual plot redrawrequired but also when any another widget drawn over canvas.This makes application with embided plot unresponsive in caseswhen popover or popup menu are drawn over plot.You may try example provided in#12010.Moving actual plot redraw out of `on_draw_event()` makes GUImuch more responsive.This changes tested with:* animation from examples/ directory* interacive pan and zoom* cursor widget with bliting* calling draw_idle() to update interactive chart
@tacaswelltacaswell added this to thev3.0 milestoneSep 6, 2018
@tacaswell
Copy link
Member

attn@fariza@OceanWolf

@akhilman
Copy link
ContributorAuthor

my bad, still have some issues with this patch, I'll fix it

Fix for previous commit.
@tacaswelltacaswell modified the milestones:v3.0,v3.1Sep 10, 2018
Copy link
Member

@farizafariza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I tested the solution and seems to work fine.

@fariza
Copy link
Member

@tacaswell are we enforcing all the coverage tests?

@anntzer
Copy link
Contributor

Only on a best-effort basis for the interactive backends; I think this PR can go in if you're happy with it regardless of coverage.

@QuLogicQuLogic merged commit51c77d6 intomatplotlib:masterSep 19, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@QuLogicQuLogicQuLogic approved these changes

@farizafarizafariza approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.1.0
Development

Successfully merging this pull request may close these issues.

Popover over plot is very slow
5 participants
@akhilman@tacaswell@fariza@anntzer@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp