Support for a coloarmap dictionary
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem?
When I plot multiple lines using xarray.plot.line(), I would like xarray to be able to get the colors from a dictionary and use that for the color of the lines.
Describe the solution you'd like
There are 2 functionalities that can solve this problem
- Add an argument that takes a dictionary and used the colors provided in the dictionary if the corresponding labels exist.
- Make it possible to add a colormap dictionary to attributes and xarray.plot uses it whenever a color corresponding to the dimension exists.
Describe alternatives you've considered
No response
Additional context
No response
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 reading xarray.plot.line() and the surrounding plotting documentation to understand how line labels and colors are currently selected. Clarify whether the dictionary should be a plotting argument or an attribute before implementing support, then verify that matching labels receive the requested colors and that existing plotting behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100