Session Ready
Exercise

Revenue histogram subplots

The revenue histogram with colors by industry (with stacked bars) you created for the The New York Stock exchange firm was enlightening for which industries tended to be in which area of the histogram.

However, the firm wishes to understand the distribution of each industry without having to hover to see. For this analysis, the previous histogram has too much in a single plot, but they don't want multiple plots. How can you help solve this conundrum?

Your task is to create a histogram of company revenues by industry as a stacked subplot and a shared x-axis to allow meaningful comparison of industries.

You have a revenues DataFrame loaded for you.

Instructions
100 XP
  • Create the subplots grid with 3 rows and 1 column and make the x-axis shared.
  • Loop through the desired industries, adding a histogram trace each time with the industry name.
  • Position the trace in the appropriate place in the subplot grid.