matplotlib / matplotlib/mplfinance
mpf.plot - extending line joining two points
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
I am using the follow code to join the lower points of two bars together (the blue bold line):
mpf.plot(data,hlines=dict(hlines=hlines_carrier,colors=['g','r'],linestyle='-.'),type='candle',alines=two_points)

However, I would like to the line to extend onto the right and touch the y-axis. What codes I should change in order to do that?
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the mpf.plot call shown in the issue, focusing on how the alines=two_points argument determines line endpoints and how hlines are rendered. Confirm the desired behavior by extending the line to the right-side y-axis without changing the candle plot, then verify it against the supplied example image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100