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

Skip to content

Commit 42dab11

Browse files
committed
TST: add test of subplot_kw
1 parent 47d62e4 commit 42dab11

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/matplotlib/tests/test_figure.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,3 +612,20 @@ def test_adjust_existing(self, fig_test, fig_ref):
612612
y = [[axA, axB], [axC, axB]]
613613

614614
grid_axes_ts = fig_test.build_grid(y)
615+
616+
@check_figures_equal(extensions=['png'])
617+
@pytest.mark.parametrize('subplot_kw', [
618+
{},
619+
{'projection': 'polar'},
620+
None
621+
]
622+
)
623+
def test_subplot_kw(self, fig_test, fig_ref, subplot_kw):
624+
x = [[1, 2]]
625+
grid_axes = fig_test.build_grid(x, subplot_kw=subplot_kw)
626+
subplot_kw = subplot_kw or {}
627+
628+
gs = fig_ref.add_gridspec(1, 2)
629+
axA = fig_ref.add_subplot(gs[0, 0], **subplot_kw)
630+
631+
axB = fig_ref.add_subplot(gs[0, 1], **subplot_kw)

0 commit comments

Comments
 (0)