Advertisements
Advertisements
Question
Observe the following figure. Identify the coding for obtaining this as output.

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