-
Notifications
You must be signed in to change notification settings - Fork 657
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
Bug Report: tight_layout should be applied after figsize #233
Comments
Please |
Version is: 0.12.6a3. Thank you as well. |
Please also do:
|
Qt5Agg |
I have been playing around with this for a while now, and I am unable to reproduce what you say you are seeing. When I set both figsize and tight_layout, there is still significantly less padding (what you call whitespace) in the Figure around the Axes. Furthermore, the code is exactly as you suggest that "tight_layout should be applied after figsize". Note that tight_layout will always leave some padding around the Figure (particularly on the left side to leave room for the y-axis labels). Also note that the amount of padding is not an absolute amount, but is rather a percentage, or fraction, of the entire Figure (and is, of course, a much smaller percentage when If you still think there is an issue, so that I can reproduce, and compare my results to yours, please provide:
Thank you. --Daniel |
As I said, the code is setting tight_layout after figsize, as you suggest. And your image appears to me as if tight_layout is indeed applied as I would expect. If you would also show an image with the same figsize but with no tight_layout, you should see a lot more white space without tight_layout; but please definitely include such an image if that is not the case.. There are a couple items to keep in mind here. Using the underlying matplotlib So I honestly do not see any " Now, if you are not satisfied with mplfinance's implementation of tight_layout, there is a kwarg that allows you scale the amount of padding (both with, or without, tight_layout). Please see this comment for information on how to do that.
All the best. --Daniel |
The |
See: #231. |
@fxhuhn |
First of all thank you for awesome work...
tight_layout
andfigsize
features work smoothly when one only is applied. But when applied together, e.g.mpf.plot(data,type='candle',figsize=(16*2, 8*2),tight_layout=True)
lots of white space 'reappear'. I assume that firsttight_layout
is applied and thenfigsize
(which brings back lots of white space), but should be vice versa.The text was updated successfully, but these errors were encountered: