MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_label_outer

Function test_label_outer

lib/matplotlib/tests/test_subplots.py:117–132  ·  view source on GitHub ↗
(remove_ticks, layout_engine, with_colorbar)

Source from the content-addressed store, hash-verified

115@pytest.mark.parametrize('layout_engine', ['none', 'tight', 'constrained'])
116@pytest.mark.parametrize('with_colorbar', [True, False])
117def test_label_outer(remove_ticks, layout_engine, with_colorbar):
118 fig = plt.figure(layout=layout_engine)
119 axs = fig.subplots(2, 2, sharex=True, sharey=True)
120 for ax in axs.flat:
121 ax.set(xlabel="foo", ylabel="bar")
122 if with_colorbar:
123 fig.colorbar(mpl.cm.ScalarMappable(), ax=ax)
124 ax.label_outer(remove_inner_ticks=remove_ticks)
125 check_ticklabel_visible(
126 axs.flat, [False, False, True, True], [True, False, True, False])
127 if remove_ticks:
128 check_tick1_visible(
129 axs.flat, [False, False, True, True], [True, False, True, False])
130 else:
131 check_tick1_visible(
132 axs.flat, [True, True, True, True], [True, True, True, True])
133
134
135def test_label_outer_span():

Callers

nothing calls this directly

Calls 7

check_ticklabel_visibleFunction · 0.85
check_tick1_visibleFunction · 0.85
figureMethod · 0.80
label_outerMethod · 0.80
subplotsMethod · 0.45
setMethod · 0.45
colorbarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…