0

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

Ethan
  • 1,625
  • 8
  • 23
  • 39
andow
  • 1

2 Answers2

0

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()
Multivac
  • 2,784
  • 2
  • 8
  • 26
  • I try it, the same result.Worried about the data being problematic and needed preprocessing – andow Jan 14 '21 at 18:28
  • 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 – Multivac Jan 14 '21 at 18:55
0

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

Stephen Rauch
  • 1,783
  • 11
  • 21
  • 34
andow
  • 1