Created
October 31, 2019 14:19
-
-
Save fleutot/9ad9dc8acf940955c9a855364e94e5f8 to your computer and use it in GitHub Desktop.
Showing wrong time axis in older version of Plotly (3.7.1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import plotly.graph_objs as go | |
from plotly.offline import plot | |
import datetime as dt | |
data = [ | |
go.Scatter( | |
x = [ | |
dt.datetime.strptime("2019-10-31T12:00:00", "%Y-%m-%dT%H:%M:%S"), | |
dt.datetime.strptime("2019-10-31T13:00:00", "%Y-%m-%dT%H:%M:%S") | |
], | |
y = [ 10, 20 ] | |
)] | |
fig = go.Figure(data) | |
plot(fig) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment