Charts/visualizations
Glean insights from your data, visually.
Getting started
1. Create and display a chart
Line charts
# import plotly
import plotly.express as px
# replace this df with your data
df = px.data.gapminder().query("country=='Canada'")
# create your chart type, for more chart types: https://plotly.com/python/
fig = px.line(df, x="year", y="lifeExp", title='Life expectancy in Canada')
# make chart prettier
fig.update_layout(
plot_bgcolor="White",
)
# display chart
fig.show()
Bar charts

Histograms

Scatter plots

Heatmaps

More chart types
2. Styling
3. Chart controls

Last updated
Was this helpful?