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

Function test_pie_default

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

Source from the content-addressed store, hash-verified

6622
6623@image_comparison(['pie_default.png'], style='mpl20')
6624def test_pie_default():
6625 # The slices will be ordered and plotted counter-clockwise.
6626 labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
6627 sizes = [15, 30, 45, 10]
6628 colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
6629 explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
6630 fig1, ax1 = plt.subplots(figsize=(8, 6))
6631 ax1.pie(sizes, explode=explode, labels=labels, colors=colors,
6632 autopct='%1.1f%%', shadow=True, startangle=90)
6633
6634
6635@image_comparison(['pie_linewidth_0.png', 'pie_linewidth_0.png', 'pie_linewidth_0.png'],

Callers

nothing calls this directly

Calls 2

pieMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…