matplotlib / matplotlib/mplfinance

Regular intervals when using datetime instead of date

Open
#74 3 comments 2 reactions 0 assignees View on GitHub
enhancement in progress
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:

![image](https://user-images.githubusercontent.com/62899768/77939412-fbcffb00-726b-11ea-8525-676f0619df23.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.