i am trying to setup the xaxis so that my candlestick chart displays all the intermediate values. I cannot figure out how to set the xaxis parameter so that plotly does not give me an error:
fig = FF.create_candlestick(df['OPEN'], df['HIGH'], df['LOW'], df['CLOSE'], dates=df['DATE'], xaxis=dict(
autorange=False,
showgrid=False,
zeroline=False,
showline=False,
autotick=True,
ticks='',
showticklabels=False
)
)
#fig['data'].extend([trace])
py.image.save_as(fig, filename='out.png', width=10000, height=1200)
The error message that i get from plotly is following:
Traceback (most recent call last):
File "./plot.py", line 63, in <module>
py.image.save_as(fig, filename='out.png', width=10000, height=1200)
File "/home/merr/.local/lib/python2.7/site-packages/plotly/plotly/plotly.py", line 787, in save_as
img = cls.get(figure_or_data, format, width, height, scale)
File "/home/merr/.local/lib/python2.7/site-packages/plotly/plotly/plotly.py", line 710, in get
raise exceptions.PlotlyError(return_data['error'])
KeyError: 'error'
If i remove the xaxis part then it works well but skips some xaxis values on my chart, please see the image below, it only shows months, not days on the xaxis.
Also, i would like to display vertical lines for each xaxis value, is that achievable?
Thanks!