Exercise

Revenue histogram with stacked bars

The New York Stock exchange firm thought your previous histogram provided great insight into how the revenue of the firms they are looking at is distributed.

However, like before, they are interested in learning a bit more about how the industry of the firms could shed more light on what is happening.

Your task is to re-create the histogram of company revenues, as before, but include the specified colors based on the list of industries given below.

There is a revenues DataFrame already loaded for your use.

Industry-color RGB definitions:

  • Tech = 124, 250, 120
  • Oil = 112,128,144
  • Pharmaceuticals = 137, 109, 247
  • Professional Services = 255, 0, 0

Instructions

100 XP
  • Create a dictionary to map the different Industry values to the RGB codes noted above.
  • Create a histogram of revenues, setting the x-axis to be the company revenue.
  • Use the industry color map you created in the histogram plot construction.
  • Set the appropriate column for the color argument.