Marcio Mendonça
Marcio Mendonça

Reputation: 25

plotly.graph_objs.Line deprecated

I'm getting this message:

plotly.graph_objs.Line is deprecated. Please replace it with one of the following more specific types

Any suggestion on how could I fix it? Code:

mortalidade_covid = round((covid_mortes/covid_casos)*100,2)

datas = mortalidade_covid.index

fig = go.Figure(data=[
    go.Line(name='Mortalidade em %', x=datas, y=mortalidade_covid, mode="lines+markers")    
])

fig['layout'].update(title="Taxa de Mortalidade", title_x=0.5, xaxis_title='Meses', yaxis_title='Taxa de Mortalidade')

fig.show()

Upvotes: 1

Views: 841

Answers (1)

Davide_sd
Davide_sd

Reputation: 13185

Simply replace go.Line with go.Scatter.

Upvotes: 2

Related Questions