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

Function test_pie_linewidth_2

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

Source from the content-addressed store, hash-verified

6688
6689@image_comparison(['pie_linewidth_2.png'], style='mpl20')
6690def test_pie_linewidth_2():
6691 # The slices will be ordered and plotted counter-clockwise.
6692 labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
6693 sizes = [15, 30, 45, 10]
6694 colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
6695 explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
6696
6697 plt.pie(sizes, explode=explode, labels=labels, colors=colors,
6698 autopct='%1.1f%%', shadow=True, startangle=90,
6699 wedgeprops={'linewidth': 2})
6700 # Set aspect ratio to be equal so that pie is drawn as a circle.
6701 plt.axis('equal')
6702
6703
6704@image_comparison(['pie_ccw_true.png'], style='mpl20')

Callers

nothing calls this directly

Calls 2

pieMethod · 0.80
axisMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…