Q. In an engineering college, number of admissions stream wise in the current year are:
Civil 15, Electrical = 35, Mechanical = 40, Chemical = 20, CS = 50
Write a program to print above information on a circular pie chart, creating a wedge for CS stream.
Answer :-
import matplotlib.pyplot as plt streams = ['Civil', 'Electrical', 'Mechanical', 'Chemical', 'CS'] adm = [15, 35, 40, 20, 50] plt.title("Admission Stream Wise") plt.axis ("equal") expl = [0, 0, 0, 0, 0.2] plt.pie (adm, labels = streams, explode = expl, autopct = "%5.1f%%") plt.show()
Output :-
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )