Plotly Axis Labels

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

# Import Plotly Module
import as px

# Import Dataset
dataset ="continent=='Oceania'")

# Axis Labels
plot = px.scatter(dataset, x="gdpPercap", y="lifeExp", color='country', title='Life Expectancy vs GDP per Capita', labels={'gdpPercap':'GDP per Capita', 'lifeExp':'Life Expectancy'})

# Show the Plot


Plotly Axis Labels

Free learning resources: AiHintsCodeAllow

Leave a Comment

Your email address will not be published.