-
Notifications
You must be signed in to change notification settings - Fork 657
Setting limits for Y-axis #106
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hmmm. Yeah, good point about the limitations on the workaround. There is code in there that specifically clips the lower part of the volume (because for very large volumes it's hard to see their differences if we let the y-axis go to zero). Let me see what i can come up with as a quick fix, hopefully for next week. Ultimately will add another panel (subplot) and bars, but currently finishing up some other enhancements. |
Furthermore, a MACD histogram has negative values which when plotted using the volume trick aren't visible since the plot places the zero close to the bottom of the axis assuming all the volume values are gonna be above it (positive). This would again need an option to set the limits for the y-axis but for the volume y-axis in the lower panel. |
I have just added a quick-fix for this issue. It is not on Pypi (and will not be for another week or so) but you can grab the change by cloning this repository and installing it locally. There are now two additional kwargs to
This will, for the time being, allow you to override whatever |
Hello, Thanks for the good work. But it seems "set_ylim" has been replace by "ylim". What is the new command for "set_ylim_panelB" now? I tried "ylim_panelB", but it did not work ... Thank you! |
@myang80 Please see https://github.com/matplotlib/mplfinance/blob/master/examples/panels.ipynb for more information on the way that panels are handled now, since the concept of "main panel" and "lower panel" or "panelB" have been deprecated (in favor of a simple panel number). |
As I am thinking about this now, it seems to me, if you want to set your own Please let me know if this is an issue for you. It may make sense to add a Thank you. --Daniel |
Meng, |
Hello,
I'm trying to plot MACD using mplfinance but the histogram is an issue. It was mentioned elsewhere that histograms in the lower panel are not implemented yet and a trick around it is to set the 'Volume' column to the histogram values we want to plot and set volume=True in mpf.plot(). The issue with his is that the MACD lines don't fit in the lower panel with the scale used for the volume. As a result, it would be necessary to have the MACD lines in a separate y-axis than the 'Volume' histogram.
Using make_addplots() to add lines to the lower panel, how do you make them have a different y-axis than the volume?
Thank you for your time,
Marc
The text was updated successfully, but these errors were encountered: