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

Work towards removing reuse-of-axes-on-collision.#10660

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
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:axstack
Mar 4, 2018

Conversation

anntzer
Copy link
Contributor

Currently, Matplotlib reuses axes when add_axes() is called a second
time with the same arguments. This behavior is deprecated since 2.1.
(xref#9037)

However we forgot to deprecate the same behavior in gca(), so we can't
remove that behavior yet.

Also cleanup docstrings of Stack class. Also,
process_projection_requirements cannot modify the outer kwargs (because
**kwargs is always a copy), so remove the incorrect note regarding the
need for copies.

(milestoning as 3.0 but would actually be nice to at least have the deprecation in 2.2...)

PR Summary

PR Checklist

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

@anntzeranntzer added this to thev3.0 milestoneMar 3, 2018
in the stack
"""

"""Raise element (present in the stack) to the stack top; return it."""
Copy link
Member

Choose a reason for hiding this comment

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

To me, this is a bit too shorted, so that is not easily to read. Alternative suggestion:
"Raise elemento to the stack top and return it. The element must be present in the stack."

if self._pos > 0:
self._pos -= 1
return self()

def push(self, o):
"""
push object onto stack at current position - all elements
occurring later than the current position are discarded
Push element to stack at current position, discard all later elements.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what the policy with docstings is, but I'd like to have articles. Also I suggest to either use and or a period between the sentences. Reads more nicely.

@@ -1249,7 +1242,7 @@ def bubble(self, o):
return o

def remove(self, o):
'remove element*o*from the stack'
"""Remove element from the stack."""
Copy link
Member

@timhoffmtimhoffmMar 3, 2018
edited
Loading

Choose a reason for hiding this comment

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

Either "Remove elemento from the stack." or "Remove the element from the stack."

@@ -67,15 +67,11 @@ def get_projection_class(projection=None):

def process_projection_requirements(figure, *args, **kwargs):
"""
Handle the args/kwargs to for add_axes/add_subplot/gca,
returning::
Handle the args/kwargs to for add_axes/add_subplot/gca, returning::
Copy link
Member

Choose a reason for hiding this comment

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

"to/for" or just "for"

Currently, Matplotlib reuses axes when add_axes() is called a secondtime with the same arguments.  This behavior is deprecated since 2.1.However we forgot to deprecate the same behavior in gca(), so we can'tremove that behavior yet.Also cleanup docstrings of Stack class.  Also,process_projection_requirements cannot modify the outer kwargs (because`**kwargs` is always a copy), so remove the incorrect note regarding theneed for copies.
@anntzer
Copy link
ContributorAuthor

reworked docstrings

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
Labels
None yet
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

3 participants
@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp