Question: 1.Histogram of total annual cases (10 points) Plot a histogram of total annual cases for each disease, using the hist function with 5 bins for
1.Histogram of total annual cases (10 points) Plot a histogram of total annual cases for each disease, using the hist function with 5 bins for each disease and bin boundaries determined automatically for i in range(3): plt.figure() cases_disease_a = [120, 150, 130, 180, 200, 190, 160, 170, 210, 220] cases_disease_b = [50, 60, 55, 70, 80, 65, 75, 90, 85, 95] plt.xtricks(range(10),Cases_)) plt.legend(diseases) plt.histog(cases_disease_a, cases_disease_b) plt.title('Fig 1.' + str(i+1) + ': Histogram of annual cases - ' + diseases[i]) plt.xlabel('Number of cases') plt.ylabel('Number of years') plt.show()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
