I’m trying to use a list of number string as xaxis.
I encountered two problems:
- The xaxis value is wrong;
- No dots is shown
Here’s the example:
import plotly.plotly as py
import plotly.graph_objs as go
import numpy as np
x = ['0501', '0502', '0503', '0504', '0505',
'0506', '0507', '0508', '0509', '0510',
'0511', '0512', '0513', '0514', '0515',
'0516', '0517', '0518', '0519', '0520',
'0521', '0522', '0523', '0524', '0525',
'0526', '0527', '0528', '0529', '0530',
'0531']
nan = np.nan
y = np.array([ nan, nan, nan, nan, nan,
nan, nan, nan, 33.56146077, nan,
nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan,
36.5123643 , nan, nan, nan, 115.36623731,
nan])
trace = go.Scatter(
x = x,
y = y
)
data = [trace]
py.iplot(data)