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

add_subplot(..., axes_class=...) for more idiomatic mpl_toolkits usage.#18573

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
jklymak merged 1 commit intomatplotlib:masterfromanntzer:axes_class
Sep 29, 2020

Conversation

anntzer
Copy link
Contributor

PR Summary

Implements#18548, see discussion there.

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 andpydocstyle<4 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).


# axes for colorbar
ax_cb = Axes(fig, divider.get_position())
# (the label prevents Axes.add_axes from incorrectly believing that the two
Copy link
ContributorAuthor

@anntzeranntzerSep 25, 2020
edited
Loading

Choose a reason for hiding this comment

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

this is#10660,#9037, etc.

projection_class, extra_kwargs = projection._as_mpl_axes()
kwargs.update(**extra_kwargs)
"Cannot combine 'axes_class' and 'projection' or 'polar'")
projection_class = axes_class
Copy link
Member

Choose a reason for hiding this comment

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

You and I have crossing PRs, so its pretty important for my rebases that you have tests if possible

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

sorry about that, added a test

Copy link
Member

Choose a reason for hiding this comment

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

This line still doesn't have a test according to codecov. I can probably be careful in my rebase, but....

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

hopefully better now

jklymak reacted with thumbs up emoji
@anntzeranntzerforce-pushed theaxes_class branch 4 times, most recently from9560d79 tocafdff1CompareSeptember 28, 2020 20:01
@anntzer
Copy link
ContributorAuthor

now with docs!

@@ -1129,6 +1138,10 @@ def add_axes(self, *args, **kwargs):
polar : bool, default: False
If True, equivalent to projection='polar'.

axes_class : subclass type of `~.axes.Axes`, optional
The `.axes.Axes` subclass that is instantiated. This parameter
is incompatible with *projection* and *polar*.
Copy link
Member

Choose a reason for hiding this comment

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

This is somewhat mysterious. Can we link to an example here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

do you want to pick one? :)

Copy link
Member

Choose a reason for hiding this comment

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

I dunno, which ever subclass gets used the most?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I found the right thing to link.

@jklymakjklymak added this to thev3.4.0 milestoneSep 29, 2020
@jklymakjklymak merged commitc24de89 intomatplotlib:masterSep 29, 2020
@anntzeranntzer deleted the axes_class branchSeptember 29, 2020 19:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp