-
Notifications
You must be signed in to change notification settings - Fork 611
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 extend the y-axis? #598
Comments
You can use kwarg Also, from what I can see, there is no reason to use mpf.plot( data[start_date:end_date],
figratio=(20,12),
type='candle',
alines=seq_of_seq_of_points,
volume=True,
tight_layout=True,
style='yahoo',
addplot=apd,
title=dict(title="SPY",y=1.05,fontsize=30,x=0.59),
ylim=(120,170) ) |
There is something else that is very strange. As you can see in the chart above, the year is present on the x-axis as part of the date. But when I plotted another plot with the same lines of codes as above, the yeas was suddenly missing from the datetime on the x-axis, as you can see in the picture below. How can the year be made visible again? |
By default, mplfinance only displays the year if your data crosses one or more December to January boundaries. This feature is part of mplfinance's "automatic" formatting of the axis, which also includes things such as displaying the time as well, if the data appears to be intraday data. You can override the "automatic" formatting of the x-axis with the For the full set of available formats, see strftime.org. |
|
Perhaps the best way to explain this problem is by the picture below. As you can see, there are three blue lines drawn, but the top line is out of plot. How can I extend the y-axis on the graph so that the top line is fully visible?
This code below created the plot:
The text was updated successfully, but these errors were encountered: