matplotlib / matplotlib/mplfinance
Regular intervals when using datetime instead of date
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
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:

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.
Contributor guide
Research direction
Reproduce the example using a dataframe with datetime or pandas.Timestamp values and inspect how mplfinance places and formats timestamps on the x-axis. Clarify whether the completed behavior should use regular intervals, user-provided time gaps, configurable date/time formatting, or all three, then verify the result against the supplied image and requested examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, pandas, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100