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

Appearance settings

Commit 72a71c9

Browse filesBrowse files
authored
Merge pull request #13585 from meeseeksmachine/auto-backport-of-pr-13578-on-v3.1.x
Backport PR #13578 on branch v3.1.x (Revert invalid change in Centered Ticklabels example)
2 parents abbbe61 + 5b60f8a commit 72a71c9
Copy full SHA for 72a71c9

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎examples/ticks_and_spines/centered_ticklabels.py

Copy file name to clipboardExpand all lines: examples/ticks_and_spines/centered_ticklabels.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
associates a label with a tick, and the label can be aligned
88
'center', 'left', or 'right' using the horizontal alignment property::
99
10-
ax.xaxis.set_tick_params(horizontalalignment='right')
10+
for label in ax.xaxis.get_xticklabels():
11+
label.set_horizontalalignment('right')
1112
1213
but this doesn't help center the label between ticks. One solution
1314
is to "fake it". Use the minor ticks to place a tick centered

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.