Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4a1a97

Browse files
committed
FIX: expand choices to top and unknown
1 parent 873057c commit b4a1a97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,8 +2535,9 @@ def _update_title_position(self, renderer):
25352535
top = 0
25362536
for ax in axs:
25372537
try:
2538-
if (ax.xaxis.get_label_position() != 'bottom'
2539-
or ax.xaxis.get_ticks_position() != 'bottom'):
2538+
choices = ['top', 'unknown']
2539+
if (ax.xaxis.get_label_position() == 'top' or
2540+
ax.xaxis.get_ticks_position() in choices):
25402541
bb = ax.xaxis.get_tightbbox(renderer)
25412542
else:
25422543
bb = ax.get_window_extent(renderer)

0 commit comments

Comments
 (0)