8000 Modify test_figure.py::test_subfigure to check for draw zorder · matplotlib/matplotlib@512da1c · GitHub
[go: up one dir, main page]

Skip to content

Commit 512da1c

Browse files
committed
Modify test_figure.py::test_subfigure to check for draw zorder
1 parent b7fe34d commit 512da1c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Loading

lib/matplotlib/tests/test_figure.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,12 @@ def test_subfigure():
12861286

12871287
fig.suptitle('Figure suptitle', fontsize='xx-large')
12881288

1289+
# below tests for the draw zorder of subfigures.
1290+
leg = fig.legend(handles=[plt.Line2D([0], [0], label='Line{}'.format(i))
1291+
for i in range(5)], loc='center')
1292+
sub[0].set_zorder(leg.get_zorder() - 1)
1293+
sub[1].set_zorder(leg.get_zorder() + 1)
1294+
12891295

12901296
def test_subfigure_tightbbox():
12911297
# test that we can get the tightbbox with a subfigure...

0 commit comments

Comments
 (0)
0