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

Function test_pie_label_formatter

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

Source from the content-addressed store, hash-verified

6874
6875
6876def test_pie_label_formatter():
6877 fig, ax = plt.subplots()
6878 pie = ax.pie([2, 3])
6879
6880 texts = ax.pie_label(pie, '{absval:03d}')
6881 assert texts[0].get_text() == '002'
6882 assert texts[1].get_text() == '003'
6883
6884 texts = ax.pie_label(pie, '{frac:.1%}')
6885 assert texts[0].get_text() == '40.0%'
6886 assert texts[1].get_text() == '60.0%'
6887
6888
6889@pytest.mark.parametrize('distance', [0.6, 1.1])

Callers

nothing calls this directly

Calls 4

pieMethod · 0.80
pie_labelMethod · 0.80
subplotsMethod · 0.45
get_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…