KnowledgeBoat Logo
|

Informatics Practices

The score of a team in 5 IPL matches is available to you. Write a program to create a pie chart from this data, showing the last match's performance as a wedge.

PyPlot

1 Like

Answer

import matplotlib.pyplot as plt
Matches = ['Match 1', 'Match 2', 'Match 3', 'Match 4', 'Match 5']
Team = [150, 160, 170, 180, 190]
expl = [0, 0, 0, 0, 0.2]
plt.pie(Team, labels = Matches, explode = expl)
plt.title('Team A Scores')
plt.show()
Output
The score of a team in 5 IPL matches is available to you. Write a program to create a pie chart from this data, showing the last match's performance as a wedge. Plotting with Pyplot, Informatics Practices Computer Science Sumita Arora Solutions CBSE Class 12

Answered By

1 Like


Related Questions