Skip to content
New issue

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

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

Already on GitHub? # to your account

Every chart plotting shows an error after mplfinance upgrade to last release #190

Closed
manuelwithbmw opened this issue Jun 25, 2020 · 10 comments
Labels
bug Something isn't working question Further information is requested

Comments

@manuelwithbmw
Copy link

manuelwithbmw commented Jun 25, 2020

Ask anything you want about mplfinance usage, project philosophy and/or priorities, or anything else related to mplfinance:

@DanielGoldfarb Every chart plotting shows an error after mplfinance upgrade to last release this morning...
How can I fix or get back to previous mplfinance version? This is pretty urgent please...Thank you

Screenshot 2020-06-25 at 14 52 35

Screenshot 2020-06-25 at 14 57 58

It seems related to the use of a new kwarg (primary_on_right=True or False) which I am not using in my call. Adding it with either True or False does not help and I get 'Unrecognized kwarg="primary_on_right"

@manuelwithbmw manuelwithbmw added the question Further information is requested label Jun 25, 2020
@DanielGoldfarb
Copy link
Collaborator

You can backout to the previous version with pip install mplfinance==0.12.5a3

Can you please provide one example of code and data so that I can try to reproduce this error? Thank.s

@DanielGoldfarb DanielGoldfarb added the bug Something isn't working label Jun 25, 2020
@manuelwithbmw
Copy link
Author

manuelwithbmw commented Jun 25, 2020

So the code I am using never changed in the last days and is below:

mc = mpf.make_marketcolors(up='#0db104', down='r',
edge='#3B3B3B',
volume='inherit',)
s = mpf.make_mpf_style(marketcolors=mc, gridaxis='both', gridcolor='#DCDCDC')

mpf.plot(df, type='candle', ylabel='Price', ylabel_lower='Volume',
mav=(21, 50, 200), volume=True, figscale=0.8, addplot=apd,
hlines=dict(hlines=[TDST_Supp, TDST_Resist], colors=[
'g', 'r'], linestyle='-.', linewidths=(1.5, 1.5)), style=s,
scale_width_adjustment=dict(candle=1.25))

This now throws that error referring to labels side with function _set_ylabels_side used in plotting.py
I only have 2 plots: candlestick above and volumes below with labels Price and Volume

@manuelwithbmw
Copy link
Author

pip install mplfinance==0.12.5a3

I regressed towards 0.12.5a3 and everything works fine, a great thank you for now

DanielGoldfarb added a commit to DanielGoldfarb/mplfinance that referenced this issue Jun 25, 2020
@DanielGoldfarb
Copy link
Collaborator

Found the issue. Turns out when you call make_mpf_style() it has the possibility to set y_on_right=None.
I've modified the code to treat None the same as False. PR is in and will be released shortly. Thanks for posting this issue.

DanielGoldfarb added a commit to DanielGoldfarb/mplfinance that referenced this issue Jun 25, 2020
DanielGoldfarb added a commit that referenced this issue Jun 25, 2020
fix y_on_right==None case (issue #190)
@DanielGoldfarb
Copy link
Collaborator

Pypi is now updated.

Manuel,
Please, if you have a few minutes, do pip isntall --upgrade mplfinance and let me know if the latest version (0.12.6a1) is fixed.

Thanks. --Daniel

@manuelwithbmw
Copy link
Author

I just tried but 0.12.6a0 has been installed from 5a3 and the problem persisted
Screenshot 2020-06-25 at 17 53 05

@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented Jun 25, 2020

Thank you. You should be getting 0.12.6a1 (not 0.12.6a0). Perhaps the Pypi server (or mirror) to which you are connecting did not get the update yet. Please try pip install --upgrade mplfinance one more time.

If that doesn't work, then please try pip install mplfinance==0.12.6a1 and let me know how it goes. If none of these work to actually get you version 0.12.6a1, then perhaps you will have to wait overnight for the mirror to get updated. (I don't know how to point pip to a particular server, but perhaps specifying mplfinance==0.12.6a1 will do the trick). Thank you.

@manuelwithbmw
Copy link
Author

Yes it was just a lag of time, trying again pip install --upgrade mplfinance I got 6a1
Screenshot 2020-06-25 at 18 05 49
and the issue is indeed fixed. You are a very quick problem solver :)

@DanielGoldfarb
Copy link
Collaborator

@manuelwithbmw
Manuel,
Thanks. Btw, if I have the correct Manuel, you are an amazing photographer, with an amazing eye for capturing well balanced and impactful images. For what its worth, I have a background in the visual arts from years ago, so (I hope) I'm not just some average person saying, "nice pics." (Although it does appear to me from your web site that you haven't posted any photography in a while).
Anyway, I just felt I needed to express this (assuming you are the correct Manuel ;-) since I was very amazed by your work.
All the best. --Daniel dgoldfarb.github@gmail.com

@manuelwithbmw
Copy link
Author

@manuelwithbmw
Manuel,
Thanks. Btw, if I have the correct Manuel, you are an amazing photographer, with an amazing eye for capturing well balanced and impactful images. For what its worth, I have a background in the visual arts from years ago, so (I hope) I'm not just some average person saying, "nice pics." (Although it does appear to me from your web site that you haven't posted any photography in a while).
Anyway, I just felt I needed to express this (assuming you are the correct Manuel ;-) since I was very amazed by your work.
All the best. --Daniel dgoldfarb.github@gmail.com

Oh my God, yeah it is me, and this is really so flattering, eye catching images or just following your feelings, sensitivity has always been my goal as a not-professional photographer. I think I had noticed your background in ats on LinkedIn a while ago, so you are certainly not the average person. It is true, since I came to London, apart from an initial period, I stopped shooting, not sure why. The story here is I had been a 'successful' portfolio manager and trader in Italy for quite a while, during 2009 crisis I have been made redundant and struggled a lot to find another job. My dad noticed I was about to lose my ball and decided to offer me a decent camera so that I could keep my head busy and re connect with my past drawing hobby or never fully expressed creativity, which you really do not use in finance. I explored some techniques, I tried to improve my style and experimented a bit, also sold a couple of shoots. After a few years I came to London, found a nice job as software engineer, so I recycled myself leveraging my tech background and after a few shoots in London I started travelling for work and being too busy to carry my old Canon 550D and my lenses. Life is being a little harsh to me recently and I picked the camera back with me, I will post something soon. I am really pleased you noticed and took the time to comment. I may organise an exhibition in London one day, who knows, in that case you will get an invite as qualified person :-)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants