matplotlib / matplotlib/mplfinance
How can I specify different colors for make_addplot?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
Well...the question is in the title. I want to specify the color to use on each indicator in the make_addplot. Is this possible in one line or I need to break it in multiple lines?
Is `mpf.make_addplot(bars[["sma_10","sma_200"]],color=["red","blue"],ax=ax1)` possible? Asking because I'm getting an error if I do this.
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 at the make_addplot entry point and reproduce the reported error with two indicators, color=["red","blue"], and ax=ax1. Trace how color is validated and applied, then inspect nearby plotting tests or documentation if available. Done means the supported behavior is clarified and, if the request is accepted, distinct colors are covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100