MCPcopy
hub / github.com/matplotlib/matplotlib / test_subplotspec_args

Function test_subplotspec_args

lib/matplotlib/tests/test_gridspec.py:66–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66def test_subplotspec_args():
67 fig, axs = plt.subplots(1, 2)
68 # should work:
69 gs = gridspec.GridSpecFromSubplotSpec(2, 1,
70 subplot_spec=axs[0].get_subplotspec())
71 assert gs.get_topmost_subplotspec() == axs[0].get_subplotspec()
72 with pytest.raises(TypeError, match="subplot_spec must be type SubplotSpec"):
73 gs = gridspec.GridSpecFromSubplotSpec(2, 1, subplot_spec=axs[0])
74 with pytest.raises(TypeError, match="subplot_spec must be type SubplotSpec"):
75 gs = gridspec.GridSpecFromSubplotSpec(2, 1, subplot_spec=axs)

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
get_subplotspecMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…