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

Skip to content

DOC: update axes_demo to directly manipulate fig, ax #14934

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 2 commits into from
Aug 1, 2019

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Jul 30, 2019

PR Summary

Directly call method on each individual axis; instead of the global
plt. one, same to create inset; directly refer to the figure on
which wee create an inset.

I also use some more explicit renaming for each axis,
and remove assignments on the LHS when those were unused as it seem like
a distraction on the subject at hand.

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

Directly call method on each individual axis; instead of the global
``plt.`` one, same to create inset; directly refer to the figure on
which wee create an inset.

I also use some more explicit renaming for each axis,
and remove assignments on the LHS when those were unused as it seem like
a distraction on the subject at hand.
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Can this PR also make reference to ax.inset_axes and the axes grid one, just so folks have the other ways to do this automagically?

@Carreau
Copy link
Contributor Author

Carreau commented Jul 31, 2019

make reference to

You mean Just refer to it in the leading text ? Or use them in the code. Can we use ":ref:" with examples ?

@Carreau
Copy link
Contributor Author

Carreau commented Jul 31, 2019

To answer myself likely yes

Our namespace convention is to prefix everything with sphx_glr and change path separators with underscores. This is valid for cross-references labels, and images.

@anntzer
Copy link
Contributor

anntzer commented Jul 31, 2019

Prefer :doc: to :ref:, per #11312.

@Carreau
Copy link
Contributor Author

Carreau commented Jul 31, 2019

Can this PR also make reference to ax.inset_axes and the axes grid one, just so folks have the other ways to do this automagically?

Prefer :doc: to :ref:, per #11312.

Done.

@anntzer anntzer merged commit 9affee4 into matplotlib:master Aug 1, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 1, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 1, 2019
@Carreau Carreau deleted the update_axes_demo branch August 1, 2019 16:12
@Carreau
Copy link
Contributor Author

Carreau commented Aug 1, 2019

Thanks.

QuLogic added a commit that referenced this pull request Aug 1, 2019
…934-on-v3.1.1-doc

Backport PR #14934 on branch v3.1.1-doc (DOC: update axes_demo to directly manipulate fig, ax)
QuLogic added a commit that referenced this pull request Aug 1, 2019
…934-on-v3.1.x

Backport PR #14934 on branch v3.1.x (DOC: update axes_demo to directly manipulate fig, ax)
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.

4 participants