Skip to content

Commit 1dfc773

Browse files
committed
Test that title is placed above an inset axes
1 parent 8abe308 commit 1dfc773

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7118,6 +7118,18 @@ def test_title_no_move_off_page():
71187118
assert tt.get_position()[1] == 1.0
71197119

71207120

7121+
def test_title_inset_ax():
7122+
# Title should be above any child axes
7123+
mpl.rcParams['axes.titley'] = None
7124+
fig, ax = plt.subplots()
7125+
ax.set_title('Title')
7126+
fig.draw_without_rendering()
7127+
assert ax.title.get_position()[1] == 1
7128+
ax.inset_axes([0, 1, 1, 0.1])
7129+
fig.draw_without_rendering()
7130+
assert ax.title.get_position()[1] == 1.1
7131+
7132+
71217133
def test_offset_label_color():
71227134
# Tests issue 6440
71237135
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)