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

Skip to content

Commit 469965b

Browse files
committed
TST: add test for title behaviour
1 parent 5f6eee8 commit 469965b

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
@@ -5710,6 +5710,16 @@ def test_title_xticks_top():
57105710
assert ax.title.get_position()[1] > 1.04
57115711

57125712

5713+
def test_title_xticks_top_both():
5714+
# Test that title moves if xticks on top of axes.
5715+
fig, ax = plt.subplots()
5716+
ax.tick_params(axis="x", bottom=True, top=True,
5717+
labelbottom=True, labeltop=True)
5718+
ax.set_title('xlabel top')
5719+
fig.canvas.draw()
5720+
assert ax.title.get_position()[1] > 1.04
5721+
5722+
57135723
def test_offset_label_color():
57145724
# Tests issue 6440
57155725
fig = plt.figure()

0 commit comments

Comments
 (0)