Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: fix Subplot calls #13526

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2019
Merged

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Feb 27, 2019

PR Summary

There were a few calls to plt.Subplot that confused the doc builds (and me! See long discussion sphinx-gallery/sphinx-gallery#448). I don't even understand how those calls worked, since pyplot does not have anything defined as Subplot. But basically they clobbered the pyplot.subplot gallery tracking. Changed these instances to add_subplot and all seems to build fine.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

@anntzer
Copy link
Contributor

anntzer commented Feb 27, 2019

anyone can merge post ci

@jklymak
Copy link
Member Author

jklymak commented Feb 27, 2019

@anntzer do you understand where Subplot comes from?

@larsoner
Copy link
Contributor

FYI you should also be able to remove the numpy and scipy entries from reference_url entry from your sphinx_gallery_conf since nowadays SG uses intersphinx.

@anntzer
Copy link
Contributor

anntzer commented Feb 27, 2019

That's the subclass of Axes actually returned by add_subplot(), but in practice no one ever calls it directly.


# the following syntax is the same as above, except perhaps more convenient:
gs01 = gs0[1].subgridspec(3, 3)

Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this newline and the one after gs00 above? Or add a comment above gs00?
When I first read the comment about "same as above", I thought it was about add_subplot, but it's really talking about the gridspec.GridSpecFromSubplotSpec(...).

Copy link
Member Author

Choose a reason for hiding this comment

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

Rephrased to # the following syntax does the same as the GridSpecFromSubplotSpec call above:

@jklymak jklymak force-pushed the doc-fix-Subplot-calls branch from 85a3ee5 to 899cdf6 Compare February 27, 2019 02:02
@jklymak jklymak force-pushed the doc-fix-Subplot-calls branch from 899cdf6 to e587e5e Compare February 27, 2019 02:03
@tacaswell tacaswell added this to the v3.1.0 milestone Feb 27, 2019
@tacaswell tacaswell merged commit 88ec92d into matplotlib:master Feb 27, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 27, 2019
QuLogic added a commit that referenced this pull request Feb 27, 2019
…526-on-v3.1.x

Backport PR #13526 on branch v3.1.x (DOC: fix Subplot calls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants