matplotlib / mplfinance

Financial Markets Data Visualization using Matplotlib
https://pypi.org/project/mplfinance/
Other
3.55k stars 616 forks source link

Regular intervals when using datetime instead of date #74

Open fintron opened 4 years ago

fintron commented 4 years ago

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.

DanielGoldfarb commented 4 years ago

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).

blonc commented 4 years ago

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.

DanielGoldfarb commented 4 years ago

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