mplfinance icon indicating copy to clipboard operation
mplfinance copied to clipboard

Regular intervals when using datetime instead of date

Open fintron opened this issue 4 years ago • 3 comments

I'm currently using mplfinance with a dataframe that contains datetime/pandas.Timestamp instead of just date. When I plot this, the x-axis ends up having irregularly spaced timestamps.

See example:

image

Instead, it would be good if either there were intervals / timegaps that were user-provided or were regularly spaced (eg. 9:30am, 12pm, 4pm, etc). It would also be nice if the user can specify the date/time format to use when graphing.

fintron avatar Mar 30 '20 16:03 fintron

Issue #21 also mentions this. However, at least for now, I will keep this issue #74 open to cover any x-ticks work (because issue #21 is requesting several, somewhat unrelated, things and it may just be easier to manage development by splitting items out into individual issues).

DanielGoldfarb avatar Mar 30 '20 19:03 DanielGoldfarb

definitely a agree this feature is needed when dealing with intraday data. Trying to have a steady intervale at the bottom is pretty important. IE timeframe printed is 30min or some other given value.

blonc avatar Mar 31 '20 20:03 blonc

Thank you. I agree. We will definitely do this. Just have a couple things, currently being worked on, to finish first.

DanielGoldfarb avatar Mar 31 '20 21:03 DanielGoldfarb