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

Function test_legend_annotate

lib/matplotlib/tests/test_legend.py:1634–1646  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1632
1633
1634def test_legend_annotate():
1635 fig, ax = plt.subplots()
1636
1637 ax.plot([1, 2, 3], label="Line")
1638 ax.annotate("a", xy=(1, 1))
1639 ax.legend(loc=0)
1640
1641 with mock.patch.object(
1642 fig, '_get_renderer', wraps=fig._get_renderer) as mocked_get_renderer:
1643 fig.savefig(io.BytesIO())
1644
1645 # Finding the legend position should not require _get_renderer to be called
1646 mocked_get_renderer.assert_not_called()
1647
1648
1649def test_boxplot_legend_labels():

Callers

nothing calls this directly

Calls 5

annotateMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45
savefigMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…