Plotly Sunburst Chart

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

# Import Plotly Module
import plotly.express as px

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

# Sunburst Chart
plot = px.sunburst(dataset, path=['country', 'year'], values='pop')

# Show the Plot
plot.show()

Output:

Plotly Sunburst Chart

Free learning resources: AiHintsCodeAllow

Leave a Comment

Your email address will not be published.