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

Function test_hist_unused_labels

lib/matplotlib/tests/test_axes.py:5294–5300  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5292
5293
5294def test_hist_unused_labels():
5295 # When a list with one dataset and N elements is provided and N labels, ensure
5296 # that the first label is used for the dataset and all other labels are ignored
5297 fig, ax = plt.subplots()
5298 ax.hist([[1, 2, 3]], label=["values", "unused", "also unused"])
5299 _, labels = ax.get_legend_handles_labels()
5300 assert labels == ["values"]
5301
5302
5303def test_hist_labels():

Callers

nothing calls this directly

Calls 3

histMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…