You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to manage the order (z axis) of the graphs added with addplot? Currently I would like to display my scatter on top of my line, but no matter what order I pass them in addplot the line appears on top. With matplotlib there is zorder which manages this.
Here is a small exemple of code for which the line_plot appears over the scatter_plot: scatter_plot = mpf.make_addplot(scatter_data, type='scatter') line_plot = mpf.make_addplot(line_data, type='line') mpf.plot(candle_data, type='candle', addplot=[scatter_plot, line_plot])
Thank you very much!
The text was updated successfully, but these errors were encountered:
Good point! I think we should add a zorder kwarg to both mpf.plot() (for the candles, etc.) and mpf.make_addplot().
Candles may be tricky because they are made up of both line collections and patch colletions which by default have different zorders; however adding zorder to make_addplot() should be relatively trivial. Are you interested in making the change?
@Omri93h
Omri,
I am hoping to have time to implement a zorder kwarg for plot() and for make_addplot() sometime in the next 6 to 8 weeks. If you would like to contribute this enhancement to mplfinance, I would be happy to guide you through the process; just let me know.
All the best. --Daniel
Is there a way to manage the order (z axis) of the graphs added with addplot? Currently I would like to display my scatter on top of my line, but no matter what order I pass them in addplot the line appears on top. With matplotlib there is zorder which manages this.
Here is a small exemple of code for which the line_plot appears over the scatter_plot:
scatter_plot = mpf.make_addplot(scatter_data, type='scatter')
line_plot = mpf.make_addplot(line_data, type='line')
mpf.plot(candle_data, type='candle', addplot=[scatter_plot, line_plot])
Thank you very much!
The text was updated successfully, but these errors were encountered: