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

Function test_ax_legend_set_loc

lib/matplotlib/tests/test_legend.py:792–797  ·  view source on GitHub ↗
(loc)

Source from the content-addressed store, hash-verified

790
791@pytest.mark.parametrize('loc', ('center', 'best',))
792def test_ax_legend_set_loc(loc):
793 fig, ax = plt.subplots()
794 ax.plot(range(10), label='test')
795 leg = ax.legend()
796 leg.set_loc(loc)
797 assert leg._get_loc() == mlegend.Legend.codes[loc]
798
799
800@pytest.mark.parametrize('loc', ('outside right', 'right',))

Callers

nothing calls this directly

Calls 5

set_locMethod · 0.80
_get_locMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…