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

Connected

Exercise

Fixing a Plotly figure

Your colleague started a project to create a visualization of sales for the first three months of 2025. However, she then left for some annual leave—but the boss wants the visualization now!

You can see she left behind a dictionary object that has started to define the visualization. It is your task to finish this dictionary with the important key arguments to turn it into a Plotly visualization.

plotly.express as px and monthly_sales DataFrame have already been loaded for you.

Instructions

100 XP
  • Define x_column and y_column using the "month" and "sales" columns.
  • Set chart_title to "Sales for Jan-Mar 2025".
  • Create a bar plot using these variables.