You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling mpl.plot() in a script the program stops, until the figure is closed. How can I open figures in background? I tried plt.ioff() but it didn't work.
The text was updated successfully, but these errors were encountered:
Someone else brought up this same issue in an email a couple of days ago. I will investigate when I have time (hopefully in a week or two).
I'm not sure, but my current hypothesis is that it has something to do with the fact that mpf.plot() is calling plt.show(), in which case adding a noshow=True kwarg, or the proposed mpf.axplot() API, may fix the problem.
(If I understand that answer correctly, it means the caller/user of mplfinance will be responsible to call plt.show()if they want the plot window to remain open after their script exits.)
The next release, mpf.plot() will accept the kwarg block=False (default value is True) to continue the script. You must however allow blocking on the last call to mpf.plot(), or otherwise somehow prevent your script from exiting. (If you do not allow blocking, and do not prevent the script from exiting, then when the script exits all non-blocked plot windows will close.) This solution was based on this answer.
When calling
mpl.plot()
in a script the program stops, until the figure is closed. How can I open figures in background? I triedplt.ioff()
but it didn't work.The text was updated successfully, but these errors were encountered: