0
$\begingroup$

When I visualize data using matplotlib it displays very well, but when using Plotly, the data display very bad.

enter image description here

enter image description here

$\endgroup$
1
$\begingroup$

Try changing the plot type on Plotly to line:

import plotly.express as px

fig = px.line(df, x="Date", y="Close", title='COMERCIAL INTERNATIONAL BANK')
fig.show()
$\endgroup$
2
  • $\begingroup$ I try it, the same result.Worried about the data being problematic and needed preprocessing $\endgroup$ – andow Jan 14 at 18:28
  • $\begingroup$ I have had the same problem that you have in plotly but in matplotlib. In your place I would try, sorting my dataframe by date and then plot in plotly $\endgroup$ – Julio Jesus Jan 14 at 18:55
0
$\begingroup$

I resolved it by removing X because it's an index.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.