-
Notifications
You must be signed in to change notification settings - Fork 654
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
how to embed mplfinance to certain program in python? #125
Comments
crossed out above comments because they are incorrect. |
Thanks. I am newbi. I usually plot matplotlib item as below.
but mpf has inclued axes.
|
I am not very familiar with embedding plots in gui applications, however I think what you need to do is set Try the following: Do not create your own figure, but rather first call
The above code is not exact. As I said I am not familiar with this stuff, but you should be able to get the general idea from the above and modify the code accordingly for your needs. Please let me know how it goes. |
I'm not sure about that. As previously mentioned, I have no experience embedding matplotlib plots in gui applications. I imagine it depends on how your code responds to the button's click event. And it seems to me your code is responding to the click by re-plotting the figure without closing the old one. You may try modifying the button click handler to check if the plot has already been plotted and, if so, do nothing. Alternatively, upon click, you may try closing the figure before plotting a new one. If the data possibly has changed, then re-plotting may be what you want:
See also here: https://stackoverflow.com/a/11141305/1639359 |
very good! |
@bluesaturn1 |
Hi.
It is very convenient and excellent.
It is well operated on Jupyter Notebook and Pycharm.
I want to embed into some program, not pop-up.
Is there any tip to embed on layout?
The text was updated successfully, but these errors were encountered: