Comments (6)
Yes the above code does work.
An example with tkinter follows:
from mplfinance.
from mplfinance.
Your code above looks fine; I think you can simplify the else
block as:
else:
if config['returnfig']:
return (fig)
# https://stackoverflow.com/a/13361748/1639359 suggests plt.show(block=False)
plt.show(block=config['block'])
(the validator is already ensuring that config['returnfig']
is a bool
, so there is no worry it's None
).
I have never used tkinter so I don't know enough to say if returning the Figure will accomplish what you want it to. I suggest, if you feel comfortable, you can make the above change in your own fork, and then test it with your tkiniter code and let me know how it works out. If it accomplishes what you want it to accomplish with tkiniter, then I will consider merging it in.
from mplfinance.
OK. There are enough people asking for this. I will include it in the next release. (Maybe a week; maybe two weeks). Thanks for getting back to me.
from mplfinance.
Thanks for the quick responses.
Although I have not tried this, it seems that if one desired to add additional subplots, one could return the figure from mplfinance and then add as many subplots as one wanted using figure.add_subplot
from mplfinance.
Thanks for the quick responses.
Although I have not tried this, it seems that if one desired to add additional subplots, one could return the figure from mplfinance and then add as many subplots as one wanted using figure.add_subplot
I don't think that will work, because by default the subplots that mpf.plot()
creates (main panel and lower [volume] panel) take up the entire Figure (except to leave some room for the axis labels).
However, I am now 95% certain that I will implement something like what I outlined here which should allow users to create as many subplots as desire in whatever configuration they desire. (The only uncertainty is not knowing what, if any, issues I may encounter while testing it; but my preliminary experiments seem to indicate that it will work OK).
from mplfinance.
Related Issues (20)
- Subplot and panel work fine when they use separately, but mix up when I try to use them in same figure, how can I solve? HOT 8
- Feature Request: HOT 2
- How do i get renko values without ploting the chart? HOT 2
- weird orange line appearing in axes' .plot() HOT 1
- Parabolic Sar and supertrend for renko
- Assist to draw Simple Moving Average. HOT 2
- I just don't know who to ask…. HOT 1
- mplfinance warn if user passes an empty data set. HOT 1
- Feature Request: The line width argument adding request for 'candlestick_ohlc' about the 'Wick/shadow' part(above/blow line) HOT 9
- Bug Report: marketcolors display error when open=close HOT 1
- Bug Report: Typo HOT 1
- How do I create a buy indicator using mplfinance? HOT 1
- Using with `matplotlib.testing.decorators.image_comparison` HOT 6
- PNF ATR Boxsize HOT 4
- Hollow and Filled Candles HOT 1
- Feature Request: Add SubFigures to Mpf_Figure HOT 2
- The example image of price-movement_plots.ipynb is inconsistent with the displayed result. HOT 3
- Interactive plots for OHLC candles with mplfinance HOT 1
- What is the most elegant way to implement ribbons? HOT 4
- Bug Report: legends on panels overlaps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mplfinance.