| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3420,6 +3420,20 @@ def test_stackplot_hatching(fig_ref, fig_test): | |||
| 3420 | 3420 | ax_ref.set_ylim(0, 70) | |
| 3421 | 3421 | ||
| 3422 | 3422 | ||
| 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 | + | ||
| 3423 | 3437 | def _bxp_test_helper( | |
| 3424 | 3438 | stats_kwargs={}, transform_stats=lambda s: s, bxp_kwargs={}): | |
| 3425 | 3439 | np.random.seed(937) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments