Skip to content
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

Line name in hlines #265

Open
nsharov opened this issue Sep 17, 2020 · 1 comment
Open

Line name in hlines #265

nsharov opened this issue Sep 17, 2020 · 1 comment
Labels
question Further information is requested

Comments

@nsharov
Copy link

nsharov commented Sep 17, 2020

Hello there!

@DanielGoldfarb , first of all, I wanted to thank you for the work done. it is very pleasant to use your module in work.

I recently started looking into the matplotlib and mplfinance packages, so I often run into problems that get resolved pretty quickly (thanks google).

Unfortunately, I could not think of or find a solution to the following problem:
I am building a graph, on this graph I display n lines, I would like to name each of these lines, or indicate their value on the y-axis.
image

As a result, I really want to get something like this:
image

p.s. Sorry if there are errors somewhere in the text (I used google translate)

@nsharov nsharov added the question Further information is requested label Sep 17, 2020
@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented Sep 18, 2020

@nsharov
Thank you for expressing your appreciation for mplfinance.

I think I can point you in the correct direction to be able to find a way to do this.

There are a few different things you can try, all of which involve first gaining access to the Axes objects. Then you can either use Axes.set_yticks(), or use text and/or annonations on the appropriate Axes object.

To gain access to the Axes objects, you can either use returnfig=True,
or create your own Figure and Axes using external Axes mode.

I recommend first trying returnfig=True.
It will keeps things simpler.

You can find more detail on these suggestions in the following links (and in the links within them) ...

All the best. Please let me know how it works out.

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