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

Skip to content

Commit 6a19dad

Browse files
committed
TST: add test for title behaviour
1 parent 66e3a61 commit 6a19dad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5723,6 +5723,16 @@ def test_title_xticks_top():
57235723
assert ax.title.get_position()[1] > 1.04
57245724

57255725

5726+
def test_title_xticks_top_both():
5727+
# Test that title moves if xticks on top of axes.
5728+
fig, ax = plt.subplots()
5729+
ax.tick_params(axis="x", bottom=True, top=True,
5730+
labelbottom=True, labeltop=True)
5731+
ax.set_title('xlabel top')
5732+
fig.canvas.draw()
5733+
assert ax.title.get_position()[1] > 1.04
5734+
5735+
57265736
def test_offset_label_color():
57275737
# Tests issue 6440
57285738
fig = plt.figure()

0 commit comments

Comments
 (0)