Plotly Area Chart

In this Plotly tutorial, you will learn how to plot an area chart in Python. You can use px.area() function to plot an area chart.

# Import Plotly Module
import plotly.express as px

# Import Dataset
dataset = px.data.gapminder().query("continent=='Oceania'")

# Area Chart
plot = px.area(dataset, x="year", y="pop", color='country', title='Plotly Area Chart', height=400, width=600)

# Show the Plot
plot.show()

Output:

Plotly Area Chart

Free learning resources: AiHintsCodeAllow

Leave a Comment

Your email address will not be published.