matplotlib / matplotlib/mplfinance

xticks beyond those in DataFrame

Open
#313 3 comments 0 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 found myself looking at trends and wanting to pseudo forecast them into the future by simply mouse over-ing at some future date. However, since that date is not in the DataFrame, there is neither tick marks nor the x,y display that is shown for all of the data.

I hacked together a solution by modifying the `IntegerIndexDateTimeFormatter`, which solves both tick marks and the x,y display.

I thought I'd post here in case it is useful to anyone else. I'm not sure if I know mplfinance well enough to know if it breaks other things or if it is worth creating a pull request.

https://github.com/mikessut/mplfinance/tree/dates_bynd_data

Contributor guide

Open the contributing guide

Research direction

Start with the IntegerIndexDateTimeFormatter change in the linked dates_bynd_data branch and reproduce the missing tick marks and x,y display for dates beyond the DataFrame. Compare the behavior with existing plots and check whether the change preserves current in-range date handling; done means future dates can be inspected without breaking existing formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.