KnowledgeBoat Logo
|

Informatics Practices

Write a program to add titles for the X-axis, Y-axis and for the whole chart in below code.

import matplotlib.pyplot as plt
Months = ['Dec', 'Jan', 'Feb', 'Mar']
Attendance = [70, 90, 75, 95]
plt.bar(Months, Attendance)
plt.show()

PyPlot

1 Like

Answer

import matplotlib.pyplot as plt
Months = ['Dec', 'Jan', 'Feb', 'Mar']
Attendance = [70, 90, 75, 95]
plt.bar(Months, Attendance)
plt.xlabel('Months')  
plt.ylabel('Attendance')
plt.title('Attendance Report')

plt.show()
Output
Write a program to add titles for the X-axis, Y-axis and for the whole chart in below code. Plotting with Pyplot, Informatics Practices Computer Science Sumita Arora Solutions CBSE Class 12

Answered By

1 Like


Related Questions