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

Function test_pie_shadow

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

Source from the content-addressed store, hash-verified

6774
6775@image_comparison(['pie_shadow.png'], style='mpl20', tol=0.002)
6776def test_pie_shadow():
6777 # Also acts as a test for the shade argument of Shadow
6778 sizes = [15, 30, 45, 10]
6779 colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
6780 explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice
6781 _, axes = plt.subplots(2, 2)
6782 axes[0][0].pie(sizes, explode=explode, colors=colors,
6783 shadow=True, startangle=90,
6784 wedgeprops={'linewidth': 0})
6785
6786 axes[0][1].pie(sizes, explode=explode, colors=colors,
6787 shadow=False, startangle=90,
6788 wedgeprops={'linewidth': 0})
6789
6790 axes[1][0].pie(sizes, explode=explode, colors=colors,
6791 shadow={'ox': -0.05, 'oy': -0.05, 'shade': 0.9, 'edgecolor': 'none'},
6792 startangle=90, wedgeprops={'linewidth': 0})
6793
6794 axes[1][1].pie(sizes, explode=explode, colors=colors,
6795 shadow={'ox': 0.05, 'linewidth': 2, 'shade': 0.2},
6796 startangle=90, wedgeprops={'linewidth': 0})
6797
6798
6799def test_pie_textprops():

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…