Skip to content

Double Y Axis... Is it possible? #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnbest5673 opened this issue Jan 31, 2020 · 3 comments
Closed

Double Y Axis... Is it possible? #22

johnbest5673 opened this issue Jan 31, 2020 · 3 comments
Labels
question Further information is requested

Comments

@johnbest5673
Copy link

Hi Daniel,

Is it possible to have 2nd Y-axis on the either side, along with the stock price? Basically, I am looking for the same feature, as I will plot some longitudes of planets to study the impact of these planets.

If you need a pic for what I am asking, here it is -
https://1.bp.blogspot.com/-3rN2z9PfuXE/XfyyxGjH_gI/AAAAAAAACRA/b6K06eP6h7w0_LLDJi6iN-C75H5mFHQXgCLcBGAsYHQ/s1600/NIFTY%2B-%2BDhuma-2.png

In the above pic, along with the candlestick chart you can see the planetary line, here only one is used, but I may require more.

Regards

@johnbest5673 johnbest5673 added the question Further information is requested label Jan 31, 2020
@DanielGoldfarb
Copy link
Collaborator

Thanks for the picture. That definitely helps. Presently a secondary Y-axis is only available on the lower panel. See this comment for more detail. I expect the next release will allow a secondary Y-axes on both panels.

That said, the mplfinance code for additional plot data supports either a line plot or scatter plot. See additional plot documentation here. So it would work fine for the the green line in your picture, but I am unsure as to how best to support the vertical black bars in your picture.

That said, when mpf.axplot() is available (maybe another month) you will certainly be able to do this, but you will have to do on your own the matplotlib work needed to plot the additional data (the green line and the vertical black bars).

All this can be done right now, with a bit of work, using the old api

@johnbest5673
Copy link
Author

Hi Daniel,

Thanks for the reply. No need to worry about the vertical black bars. They are simple vertical lines to denote the crossing of Green colored line and the horizontal ones.

I will be watching the project and will wait for required plot.

Thanks again for this wonderful project. :)

Regards

@DanielGoldfarb
Copy link
Collaborator

DONE. See documentation here. towards the bottom. pip install --upgrade mplfinance to pick up the enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants