1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Plotly in Python

Connected

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 examining is distributed.

However, like before, they are interested in learning a bit more about how the firms' industries 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 histogram of revenues, using Revenue as the x-axis.
  • Apply the industry color map you created.
  • Set the appropriate column for the color argument.