oldoc63 / learningDS

Learning DS with Codecademy and Books
0 stars 0 forks source link

Bar chart with error #492

Open oldoc63 opened 1 year ago

oldoc63 commented 1 year ago

We are going to look at the chart called bar_chart.png. The data you will need to recreate this chart is in the lists past_years_averages, years, and error. Save your recreated bar to a file called my_bar_chart.png.

  1. Create a figure of width 10 and height 8
  2. Plot the blue bars, which have the heights listed in past_years_averages
oldoc63 commented 1 year ago
  1. Add error bars of cap size 5 and heights corresponding to the list error
  2. Set the axis to go from -0.5 to 6.5 on the x-axis and 70 to 95 on the y-axis
oldoc63 commented 1 year ago
  1. Create an ax object using plt.subplot(). Use ax to set the x-axis ticks to be range(len(years)) and the x-axis labels to be the years list.
oldoc63 commented 1 year ago
  1. Add the title "Final Exam Averages", x-axis label "Year", and y-axis label "Test average".
oldoc63 commented 1 year ago
  1. Save your figure to a file called my_bar_chart.png.