For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How can I show datetime rather than just date in x value in plot
-
As is shown in the attached image, how can I show the detailed time in "x=" stuff, like, "x=2019-05-15 09:30:00", which can be useful especially in backtests with minutes data.
Many thanks!
-
Hi @yoghurtshawn,
You should be able to set the strftime format with the params
fmt_x_ticks
andfmt_x_data
.Try with:
cerebro.plot( # Format string for the display of ticks on the x axis fmt_x_ticks = '%Y-%b-%d %H:%M', # Format string for the display of data points values fmt_x_data = '%Y-%b-%d %H:%M' )
You should be getting something like this:
-
@Pablo-Reyes-Almagro It works! thx!
-
@pablo-reyes-almagro
@yoghurtshawnI tried this but it didn't work for me. Is there anything else I need to know?