-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Cleanup Spine placement example #24377
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
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
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. |
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. |
…377-on-v3.6.x Backport PR #24377 on branch v3.6.x (DOC: Cleanup Spine placement example)
…377-on-v3.6.2-doc Backport PR #24377 on branch v3.6.2-doc (DOC: Cleanup Spine placement example)
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