Now, we are going to look at the chart called histograms.png
. This displays the breakdown of final exam scores between your first year of teaching vs your second year of teaching.
The data you will need to recreate this chart is in the lists exam_scores1
and exam_scores2
.
Save your recreated chart to a file called my_histogram.png
.
Instructions
Create a figure of width 10
and height 8
.
Make a histogram of the exam_scores1
, normalized, with 12
bins.
Make a histogram of the exam_scores2
, normalized, with 12
bins.
Add histtype = 'step'
to each plt.hist
call, in order to make these histograms more visible.
We can also make the lines thicker by setting the linewidth
inside the calls to plt.hist
.
Let’s set the linewidth
to be 2
for both histograms.
Create a legend showing that the first set of data is "1st Yr Teaching"
and the second set of data is "2nd Yr Teaching"
.
Add the title, x-axis label, and y-axis label that you see on the final graph.
Save your figure to a file called my_histogram.png
.