mplfinance
mplfinance copied to clipboard
One Y axis on panel with multiple studies?
I am having trouble specifying one y axis for all studies on my sub panels. Is there a way to remove either the left or right y axis and fixing them to one?
I tried to add a 0 line to my studies, as you can see the line starts at 0 on the left and ends slightly above zero on the right, it makes it hard to visually see when the 0 line is crossed and if it was correctly crossed.
I apologize if if I am out of the contributing guidelines, my internet is dismal at the moment and haven't been able to load the guidelines.
This is not related to the number of studies, but rather to the relative magnitude of the studies in relation to each other.
This is documented in the addplot tutorial between cells In [15]
and In [16]
. To quote:
Plotting additional data with a secondary y-axis
-
mpf.make_addplot()
has a keyword argument calledsecondary_y
which can have three possible values:-
True
, -
False
, and -
'auto'
-
- The default value is
'auto'
which means if you don't specifysecondary_y
, or if you specifysecondary_y='auto'
, thenmpf.plot()
will attempt to decide whether a secondary y-axis is needed, by comparing the order of magnitude of the addplot data with the order of magnitude of the data that is already on the plot. - If
mpf.plot()
gets it wrong, you can always override by settingsecondary_y=True
orsecondary_y=False
.
I just noticed that my browser double posted this question. I would remove one if I could.
Thank you so much Daniel.