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

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

Instructor-svgAl-Mamun Sarkar
Apr 02 , 2020

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()

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