CBSE Class 12 Informatics Practices Question 147 of 147

Plotting with Pyplot — Question 30

Back to all questions
30
Question

Question 18

Sina has created ordered set of data from the number of new customers registered on his online service centre in last 20 months.

Write a program to plot this data on a filled boxplot with means shown.

Answer
import matplotlib.pyplot as plt
data = [100, 120, 95, 110, 105, 130, 115, 125, 135, 140, 120, 110, 105, 115, 130, 125, 110, 115, 120, 135]
plt.boxplot(data, patch_artist = True, showmeans = True)
plt.title('Number of New Customers Registered in Last 20 Months')
plt.show()
Output
Sina has created ordered set of data from the number of new customers registered on his online service centre in last 20 months. Write a program to plot this data on a filled boxplot with means shown. Plotting with Pyplot, Informatics Practices Computer Science Sumita Arora Solutions CBSE Class 12