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

Cleanups to webagg & friends.#19127

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
dopplershift merged 1 commit intomatplotlib:masterfromanntzer:webagg
Dec 16, 2020
Merged

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedDec 16, 2020
edited
Loading

FigureCanvasWebAgg and FigureCanvasNbAgg empty subclasses of
FigureCanvasWebAggCore. They only differed in that WebAggCore did not
define the (common) timer class, which is easily fixed (but the
TimerTornado definition needs to be moved above the
FigureCanvasWegAggCore definition), and that WebAgg explicitly redefined
show to use the module'sshow, whereas WebAggCore'sshow uses
pyplot.show... butpyplot.show is defined as calling the backend
module'sshow, so it comes down to the same.

Still it's useful for them to be subclasses rather than straight
aliases, to keep the possibility of a canvas->manager mapping (#18854).

No need to explicitly mark WebAggCore assupports_blit, as that's
autodetected now (one can easily check that
FigureCanvasWebAggCore.supports_blit is still True).

Savingpgf to a BytesIO actually works fine nowadays, and can indeed
by manually tested on WebAgg.

PR Summary

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

FigureCanvasWebAgg and FigureCanvasNbAgg empty subclasses ofFigureCanvasWebAggCore.  They only differed in that WebAggCore did notdefine the (common) timer class, which is easily fixed (but theTimerTornado definition needs to be moved above theFigureCanvasWegAggCore definition), and that WebAgg explicitly redefined`show` to use the module's `show`, whereas WebAggCore's `show` uses`pyplot.show`... but `pyplot.show` is defined as calling the backendmodule's `show`, so it comes down to the same.Still it's useful for them to be subclasses rather than straightaliases, to keep the possibility of a canvas->manager mapping.No need to explicitly mark WebAggCore as `supports_blit`, as that'sautodetected now (one can easily check that`FigureCanvasWebAggCore.supports_blit` is still True).Saving `pgf` to a BytesIO actually works fine nowadays, and can indeedby manually tested on WebAgg.
@tacaswelltacaswell added this to thev3.4.0 milestoneDec 16, 2020
@jklymak
Copy link
Member

What is the test for this, since its largely untested by CI?

@anntzer
Copy link
ContributorAuthor

anntzer commentedDec 16, 2020
edited
Loading

test_backends_interactive.py::test_webagg should cover a good part of it? In fact looking athttps://codecov.io/gh/matplotlib/matplotlib/commit/25ee876375a1d98f9f925348a2578d40cc75cd0b the sole source of non-coverage is the fact that some of TimerTornado is untested, but I just shifted the whole implementation verbatim upwards in the source file...

@dopplershiftdopplershift merged commit39737b8 intomatplotlib:masterDec 16, 2020
@anntzeranntzer deleted the webagg branchDecember 16, 2020 19:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@dopplershiftdopplershiftdopplershift approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.4.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@jklymak@tacaswell@dopplershift

[8]ページ先頭

©2009-2025 Movatter.jp