matplotlib / matplotlib/matplotlib
[MNT]: Clarify whether the values of an AxesImage are known as "data" or as "array"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Summary
The docstring of `AxesImage.set_array` says "Retained for backwards compatibility - use set_data instead.", but on the getter side, only `get_array` (inherited from ScalarMappable) exists -- `get_data` doesn't even exist.
### Proposed fix
Be consistent as to which name, "data" or "array", is used. I suspect they could even be made aliases of one another at the ScalarMappable level...
(Perhaps also distantly related to the colorizer-related API changes.)
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 comparing the AxesImage.set_array docstring with ScalarMappable.get_array, and review the possible relationship to the colorizer-related API changes mentioned in the issue. Done means the project has a decided, consistent naming scheme for these values and the relevant getter/setter behavior and documentation reflect that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, data-visualization
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100