Ewdlam
Ewdlam

Reputation: 935

"symbol" and "markers" don't seem to work anymore in the line function of plotly-express

In the website of plotly express, there is an example to use "symbol" and "markers" as an argument for the line function :

import plotly.express as px
df = px.data.gapminder().query("continent == 'Oceania'")
fig = px.line(df, x='year', y='lifeExp', color='country', markers=True)
fig.show()

import plotly.express as px
df = px.data.gapminder().query("continent == 'Oceania'")
fig = px.line(df, x='year', y='lifeExp', color='country', symbol="country")
fig.show()

These two examples don't work for me :

line() got an unexpected keyword argument 'markers'

line() got an unexpected keyword argument 'symbol'

Would you know why ? Is there an alternative ?

Upvotes: 1

Views: 1953

Answers (2)

nphaibk
nphaibk

Reputation: 121

In case ones use anaconda, channel plotly needs to be specified:

conda update -c plotly plotly

Upvotes: 0

Ewdlam
Ewdlam

Reputation: 935

Thanks to @Rob Raymond comment, the solution was to update plotly :

pip install --upgrade plotly

Upvotes: 2

Related Questions