Session Ready
Exercise

Enhancing legibility

You and your colleagues have decided that the most important aspect of the data you want to show is the differences between the most "market-friendly" state, Vermont, and the least, Texas. To do this, put two plots side by side – a barplot showing the number of people per farmer's market in the state and a scatter plot showing the population on the x-axis and the number of markets on the y-axis.

Emphasize your findings by calling out Vermont and Texas by assigning them distinct colors. Also, provide a large and easy to read annotation for Texas.

Supplied is a vector state_colors that assigns Vermont and Texas unique colors and all other states gray along with the annotation describing Texas, tx_message.

Instructions
100 XP
  • Map the supplied color vector state_colors to the bar plot (ax1) with the palette argument in sns.barplot().
  • Map the color vector to the scatter plot points with the color argument.
  • Make sure annotation text is legible by changing its size to 15.