Adding Shadow to Pie Chart using pyplot of python mathplotlib module

Adding Shadow to Pie Chart using pyplot of python mathplotlib module

Instructor-svgAl-Mamun Sarkar
Apr 02 , 2020

Adding Shadow to Pie Chart using pyplot of python mathplotlib module, The following codes shows how to add shadow to Pie Chart using python mathplotlib module.

 

Import Module:

import matplotlib.pyplot as plt

 

Create Data:

slices_data = [70,20,20,130]
all_activities = ['sleeping','eating','working','playing']

 

Creating Pie Char And Adding Shadow:

plt.pie(slices_data, 
        labels=all_activities, 
        colors=colors,
       startangle=90,
       shadow = True)
plt.title("Welcome to pie chart tutorial")
plt.xlabel('X-Axis')
plt.ylabel('Y-Axis')
plt.legend()
plt.show()

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram