Matplotlib Styles: FiveThirtyEight Case Study (screen 4)

Screenshot 2021-04-14 at 14.19.21

I am stuck on this code. I cannot seem to understand where the values in the x_coords dictionary are from, as well as y_coord. But, I get that after every iteration 1 is subtracted from y_coord. Can someone kindly explain this to me. Thank you!

Hi @adetolaadeya, we chose these coordinates by a process of trial and error, knowing that we want the y-tick labels to be centered and in-between the two horizontal bar plots.

Oh alright! thank you

1 Like