🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@timhoffm
Copy link
Member

@timhoffm timhoffm commented Nov 6, 2022

  • 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

@timhoffm timhoffm added this to the v3.6.3 milestone Nov 6, 2022
@timhoffm timhoffm force-pushed the doc-spine-positions branch from 2058803 to 42f2bda Compare November 6, 2022 01:16
- 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
@timhoffm timhoffm force-pushed the doc-spine-positions branch from 42f2bda to 78758e9 Compare November 6, 2022 01:17
@tacaswell
Copy link
Member

https://output.circle-artifacts.com/output/job/d0c88874-3987-4de0-8354-b71a50bbba6b/artifacts/0/doc/build/html/gallery/spines/spine_placement_demo.html

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.

@tacaswell tacaswell modified the milestones: v3.6.3, v3.6-doc Nov 6, 2022
@timhoffm
Copy link
Member Author

timhoffm commented Nov 6, 2022

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.

@timhoffm timhoffm merged commit 9dbcbe2 into matplotlib:main Nov 6, 2022
@timhoffm timhoffm deleted the doc-spine-positions branch November 6, 2022 09:54
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)
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants