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

dynamically generate pyplot functions#9173

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

Closed
anntzer wants to merge7 commits intomatplotlib:masterfromanntzer:autogen-pyplot

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedSep 9, 2017
edited
Loading

PR Summary

Dynamically generate pyplot functions at import time. Functions define a proper__signature__ (via thefuncsigs backport on Py2, which is a new dependency).

This PR does not appear to cause slowdown in the import time, as shown by

import sysfrom time import perf_counterfor _ in range(10):    start = perf_counter()    import matplotlib.pyplot    stop = perf_counter()    print("elapsed: {}ms".format(int((stop - start) * 1000)))    for mod_name in list(sys.modules):        if mod_name.startswith("matplotlib"):            del sys.modules[mod_name]

hold functionality was removed from the pyplot functions (it is scheduled for removal anyways) to avoid a needlessly complex implementation.

Remove boilerplate.py, which becomes unused.

Dynamically generate some more functions (plt.axis,plt.clf, etc.) which actually fall into the same pattern. Fix their docstrings accordingly.

[As a side note, some profiling suggests that right now the slowest step at import time is by far the calls to the various checkdep_* if you happen to have theps.usedistiller ortext.usetex rcparams set.]

PR Checklist

  • [OK] Has Pytest style unit tests (well, if the current test suite still pass)
  • [OK] Code is PEP 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] 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) (not clear if needed (hold also needs to be removed from the Axes class itself, this can be the object of a separate PR and documented there))
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer
Copy link
ContributorAuthor

anntzer commentedSep 9, 2017
edited
Loading

I can't understand why funcsigs isn't getting installed on appveyor+py2 :/
edit: fixed

@anntzeranntzer mentioned this pull requestSep 10, 2017
6 tasks
@tacaswelltacaswell added this to the2.2 (next next feature release) milestoneSep 17, 2017
@anntzeranntzerforce-pushed theautogen-pyplot branch 2 times, most recently froma408d6e toa64c34eCompareNovember 10, 2017 19:04
@anntzeranntzerforce-pushed theautogen-pyplot branch 2 times, most recently from475bc46 toaed0979CompareJanuary 10, 2018 03:42
@tacaswelltacaswell modified the milestones:v2.2,v3.0Jan 10, 2018
@anntzer
Copy link
ContributorAuthor

anntzer commentedApr 1, 2018
edited
Loading

Replaced by#10918/#10934/... after discussion with@tacaswell.

@anntzeranntzer closed thisApr 1, 2018
@anntzeranntzer deleted the autogen-pyplot branchApril 1, 2018 03:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

2 participants
@anntzer@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp