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

Function test_alpha_handles

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

Source from the content-addressed store, hash-verified

1291
1292
1293def test_alpha_handles():
1294 x, n, hh = plt.hist([1, 2, 3], alpha=0.25, label='data', color='red')
1295 legend = plt.legend()
1296 for lh in legend.legend_handles:
1297 lh.set_alpha(1.0)
1298 assert lh.get_facecolor()[:-1] == hh[1].get_facecolor()[:-1]
1299 assert lh.get_edgecolor()[:-1] == hh[1].get_edgecolor()[:-1]
1300
1301
1302@needs_usetex

Callers

nothing calls this directly

Calls 5

histMethod · 0.80
legendMethod · 0.45
set_alphaMethod · 0.45
get_facecolorMethod · 0.45
get_edgecolorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…