Skip to content

make_addplot with a legend #409

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
prRZ5F4LXZ opened this issue Jun 16, 2021 · 1 comment
Closed

make_addplot with a legend #409

prRZ5F4LXZ opened this issue Jun 16, 2021 · 1 comment
Labels
question Further information is requested

Comments

@prRZ5F4LXZ
Copy link

import yfinance as yf
df = yf.Ticker('MSFT').history(period='1y')
import mplfinance as mpf
import pandas_ta as ta
apdict = mpf.make_addplot(ta.sma(df['Close'], length=10), linestyle='dotted')
mpf.plot(df, block=False, volume=True, addplot=apdict, savefig='/tmp/MSFT.pdf')

I can plot some data using make_addplot(). But I don't see an option that can add a legend.

https://github.com/matplotlib/mplfinance/blob/master/src/mplfinance/plotting.py#L1024

Is there a way to do so? Thanks.

@prRZ5F4LXZ prRZ5F4LXZ added the question Further information is requested label Jun 16, 2021
@DanielGoldfarb
Copy link
Collaborator

duplicate of #276

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