Answers for "how to plot pie char with percentage in python"

0

how to plot pie char with percentage in python

import matplotlib.pyplot as plt

labels= ['Mortgage', 'Utilities', 'Food', 'Gas']

colors=['blue', 'yellow', 'green', 'orange']

sizes= [1500, 600, 500, 300]

plt.pie(sizes,labels=labels, colors=colors, startangle=90, autopct='%1.1f%%')

plt.axis('equal')

plt.show()
Posted by: Guest on October-27-2021

Code answers related to "how to plot pie char with percentage in python"

Python Answers by Framework

Browse Popular Code Answers by Language