Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents abbbe61 + 5b60f8a commit 72a71c9Copy full SHA for 72a71c9
1 file changed
examples/ticks_and_spines/centered_ticklabels.py
@@ -7,7 +7,8 @@
7
associates a label with a tick, and the label can be aligned
8
'center', 'left', or 'right' using the horizontal alignment property::
9
10
- ax.xaxis.set_tick_params(horizontalalignment='right')
+ for label in ax.xaxis.get_xticklabels():
11
+ label.set_horizontalalignment('right')
12
13
but this doesn't help center the label between ticks. One solution
14
is to "fake it". Use the minor ticks to place a tick centered
0 commit comments