Plotly Title

In this Plotly tutorial, you will learn how to set title of plot. You have to use title parameter for this.

# Import Plotly Module
import plotly.express as px

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

# Title
plot = px.scatter(dataset, x="gdpPercap", y="lifeExp", color='country', title='Life Expectancy vs GDP per Capita')

# Show the Plot
plot.show()

Output:

Plotly Title

Free learning resources: AiHintsCodeAllow

Leave a Comment

Your email address will not be published.