Skip to content

Commit b370e30

Browse files
committed
Add smoke test
1 parent db6cf15 commit b370e30

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,20 @@ def test_stackplot_hatching(fig_ref, fig_test):
34203420
ax_ref.set_ylim(0, 70)
34213421

34223422

3423+
def test_stackplot_subfig_legend():
3424+
# Smoke test for https://github.com/matplotlib/matplotlib/issues/30158
3425+
3426+
fig = plt.figure()
3427+
subfigs = fig.subfigures(nrows=1, ncols=2)
3428+
3429+
for _fig in subfigs:
3430+
ax = _fig.subplots(nrows=1, ncols=1)
3431+
ax.stackplot([3, 4], [[1, 2]], labels=['a'])
3432+
3433+
fig.legend()
3434+
fig.draw_without_rendering()
3435+
3436+
34233437
def _bxp_test_helper(
34243438
stats_kwargs={}, transform_stats=lambda s: s, bxp_kwargs={}):
34253439
np.random.seed(937)

0 commit comments

Comments
 (0)