quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

Plots Close Instantly in Terminal

Open rubikscube09 opened this issue 4 years ago • 4 comments

Hi!

Big fan of these tearsheets - they are quite nice to look at and are quite useful. I was wondering if anyone else was having the issue of opening the plots generated in the (ipython) terminal - they are generated, but instantly closed afterwards.

Thanks!

rubikscube09 avatar Jun 30 '21 16:06 rubikscube09

I have the same problem! Could you solve it? @rubikscube09

justomarelli avatar Nov 05 '21 19:11 justomarelli

@justomarelli unfortunately not! I just use the html reports now.

rubikscube09 avatar Nov 10 '21 15:11 rubikscube09

The same issue here. python.org's IDLE, LiClipse - plot windows close immediately after opening.

a-m-p-m avatar Feb 05 '22 12:02 a-m-p-m

@ranaroussi I had the same issue just now, running in pycharm and terminal was creating the same issue, I looked into the wrappers here https://github.com/ranaroussi/quantstats/blob/0a51fe05ebaa74b92d613d075cee2f02dd7fef31/quantstats/_plotting/wrappers.py#L166 I removed the block argument and it started working, the pyplot docs says it's doing it on default so not sure why we have to force it there (there might be a very good reason I don't know about, I just took 2 minutes to look into this and found out how to make it work)

so for anybody having the issue, just go to this file and change the line to _plt.show()

Shraneid avatar Feb 21 '22 20:02 Shraneid