matplotlib / matplotlib/mplfinance

mpf.plot - extending line joining two points

Open
#278 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

![mplfinance_extend_line](https://user-images.githubusercontent.com/40787673/96536884-96a32c00-12c7-11eb-8cb1-d05ec0c27ac2.png)

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.