Setting Starting Angle of pie chart using pyplot of python mathplotlib module

Author: Al-mamun Sarkar Date: 2020-04-02 17:37:10

Setting Starting Angle of pie chart using pyplot of python mathplotlib module. The following codes shows how to set starting angle of 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']

 

Setting Starting Angle:

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