1. Learn
  2. /
  3. Courses
  4. /
  5. Improving Your Data Visualizations in Python

Exercise

Using band thickness instead of coloring

You are a researcher investigating the elevation a rocket reaches before visual is lost and pollutant levels at Vandenberg Air Force Base. You've built a model to predict this relationship (stored in the DataFrame rocket_height_model), and since you are working independently, you don't have the money to pay for color figures in your journal article. You need to make your model results plot work in black and white. To do this, you will plot the 90, 95, and 99% intervals of the effect of each pollutant as successively smaller bars.

Instructions

100 XP
  • Use a thickness of 15 for 90%, 10 for 95%, and 5 for 99% interval lines.
  • Pass the interval thickness value to plt.hlines().
  • Set the interval color to 'gray' to lighten contrast.