matplotlib / matplotlib/mplfinance
zorder of plots (scatter - line) added with addplot
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided candle, scatter, and line example with mpf.make_addplot() and mpf.plot(). Trace how addplot entries are rendered and how their order is determined. Done means callers can control whether the scatter is drawn above the line, with the existing example behaving as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100