Work towards removing reuse-of-axes-on-collision.#10660
Merged
timhoffm merged 1 commit intomatplotlib:masterfrom Mar 4, 2018
Merged
Work towards removing reuse-of-axes-on-collision.#10660timhoffm merged 1 commit intomatplotlib:masterfrom
timhoffm merged 1 commit intomatplotlib:masterfrom
Conversation
jklymak
approved these changes
Mar 3, 2018
timhoffm
approved these changes
Mar 3, 2018
lib/matplotlib/cbook/__init__.py
Outdated
| in the stack | ||
| """ | ||
|
|
||
| """Raise element (present in the stack) to the stack top; return it.""" |
Member
There was a problem hiding this comment.
To me, this is a bit too shorted, so that is not easily to read. Alternative suggestion:
"Raise element o to the stack top and return it. The element must be present in the stack."
lib/matplotlib/cbook/__init__.py
Outdated
| """ | ||
| 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. |
Member
There was a problem hiding this comment.
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.
lib/matplotlib/cbook/__init__.py
Outdated
|
|
||
| def remove(self, o): | ||
| 'remove element *o* from the stack' | ||
| """Remove element from the stack.""" |
Member
There was a problem hiding this comment.
Either "Remove element o from the stack." or "Remove the element from the stack."
| """ | ||
| Handle the args/kwargs to for add_axes/add_subplot/gca, | ||
| returning:: | ||
| Handle the args/kwargs to for add_axes/add_subplot/gca, returning:: |
Currently, Matplotlib reuses axes when add_axes() is called a second time with the same arguments. This behavior is deprecated since 2.1. 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.
Contributor
Author
|
reworked docstrings |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
**kwargsis always a copy), so remove the incorrect note regarding theneed for copies.
(milestoning as 3.0 but would actually be nice to at least have the deprecation in 2.2...)
PR Summary
PR Checklist