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

Function test_subfigure_legend

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

Source from the content-addressed store, hash-verified

1445
1446
1447def test_subfigure_legend():
1448 # Test that legend can be added to subfigure (#20723)
1449 subfig = plt.figure().subfigures()
1450 ax = subfig.subplots()
1451 ax.plot([0, 1], [0, 1], label="line")
1452 leg = subfig.legend()
1453 assert leg.get_figure(root=False) is subfig
1454
1455
1456def test_setting_alpha_keeps_polycollection_color():

Callers

nothing calls this directly

Calls 6

subfiguresMethod · 0.80
figureMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
legendMethod · 0.45
get_figureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…