oldoc63 / learningDS

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

Side by side bars #493

Open oldoc63 opened 1 year ago

oldoc63 commented 1 year ago

Now, we are going to look at the chart called side-by-side.png. This display the differences in average test scores between students who went to two different middle schools before enrolling in your high school. The data you will need to recreate this chart is in the lists middle_school_a, middle_school_b, and unit_topics. Save your recreated chart to a file called my_side_by_side.png.

oldoc63 commented 1 year ago
  1. Using create_x, make the lists school_a_x and school_b_x which will determine where to put the bars for Middle School A and Middle School B along the x-axis.
oldoc63 commented 1 year ago
  1. Create a figure of width 10 and height 8.
  2. Create a set of axes and save them to ax.
oldoc63 commented 1 year ago
  1. Plot a set of bars representing middle_school_a and a set representing middle_school_b next to each other on the same graph.
oldoc63 commented 1 year ago
  1. Create a new list of x-values called middle_x, which are the values in the middle of school_a_x and school_b_x. This is where we will place the x-ticks. Look at the final graph to see this placement.
oldoc63 commented 1 year ago
  1. Set the x-ticks to be the middle_x list.
oldoc63 commented 1 year ago
  1. Set the x-tick labels to be the list unit_topics.
oldoc63 commented 1 year ago
  1. Create a legend, as shown in the final graph, that labels the first set of bars Middle School A and the second set of bars Middle School B.
oldoc63 commented 1 year ago
  1. Create a title (“Test Averages on Different Units”), x-axis label ("Unit"), and y-axis label ("Test Average").
oldoc63 commented 1 year ago
  1. Save your figure to a file called my_side_by_side_png.