DOC: Cleanup Spine placement example#24377
Merged
timhoffm merged 1 commit intomatplotlib:mainfrom Nov 6, 2022
Merged
Conversation
2058803 to
42f2bda
Compare
- use `subplot_mosaic()` instead of `subplot(n, m, k)` calls
- hide spines using `set_visible(False)` instead of `set_color('none')`
- use multi-assignment (`spines[['left', 'bottom']].set_*`) when
possible
- remove `ax.xaxis.set_ticks_position('bottom')` and
`ax.yaxis.set_ticks_position('left')`, because these are already the
defaults
- reference the example in `spine_set_positions()` docstring
42f2bda to
78758e9
Compare
tacaswell
approved these changes
Nov 6, 2022
Member
|
vs https://matplotlib.org/stable/gallery/spines/spine_placement_demo.html Is the change. I was momentarily thrown by the change from [-pi, pi] for the range to [0, 2pi]. @timhoffm can self-merge if that was a reasoned choice. |
Member
Author
|
That change is intentional. Sorry that I forgot to list and explain it. For a 0-symmetric x range, „center“ and „zero“ modes have the same effect. Going to [0, 2pi] makes the difference obvious. |
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Nov 6, 2022
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Nov 6, 2022
jklymak
added a commit
that referenced
this pull request
Nov 7, 2022
…377-on-v3.6.x Backport PR #24377 on branch v3.6.x (DOC: Cleanup Spine placement example)
jklymak
added a commit
that referenced
this pull request
Nov 7, 2022
…377-on-v3.6.2-doc Backport PR #24377 on branch v3.6.2-doc (DOC: Cleanup Spine placement example)
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.
subplot_mosaic()instead ofsubplot(n, m, k)callsset_visible(False)instead ofset_color('none')spines[['left', 'bottom']].set_*) when possibleax.xaxis.set_ticks_position('bottom')andax.yaxis.set_ticks_position('left'), because these are already the defaultsspine_set_positions()docstring