Mplfinance: Every chart plotting shows an error after mplfinance upgrade to last release

Created on 25 Jun 2020  路  10Comments  路  Source: matplotlib/mplfinance

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"

bug question

All 10 comments

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

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

pip install mplfinance==0.12.5a3

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

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.

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

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

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.

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

@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.[email protected]

@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.[email protected]

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonholzapfel picture simonholzapfel  路  5Comments

jainraje picture jainraje  路  4Comments

schorschie picture schorschie  路  3Comments

andresberejnoi picture andresberejnoi  路  6Comments

franklee00 picture franklee00  路  4Comments