matplotlib / matplotlib/matplotlib
Document idiosyncratic behavior of `transform` kwarg
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Bug report
**Bug summary**
Passing `transform=None` through imshow results in a blank plot.
I've been playing around a little bit with data transforms and projections in matplotlib. For one of the things I've been testing out, I also want to see how my data looks if the transform isn't set by the user, so I passed in `transform=None` as a kwarg to imshow. This resulted in a blank plot. I'm not sure if this is a preferred outcome, but I personally would have expected a plot without a transform set, but the data showing.
**Code for reproduction**
```python
from numpy import random
import matplotlib.pyplot as plt
data = random.random((20,20))
fig, (ax1, ax2) = plt.subplots(2)
ax1.imshow(data)
ax2.imshow(data, transform=None)
plt.show()
```
**Outcome**

**Matplotlib version**
* Operating system: OSX Sierra 10.12.6
* Matplotlib version: 2.2.2 and 3.0.0
* Matplotlib backend (`print(matplotlib.get_backend())`): MacOSX
* Python version: 3.6.5 and 3.6.6
I tried testing this script out in two different conda environments that I have on my machine with the same result. Both envs I tested this script out on use matplotlib pulled from conda-forge. One environment has v2.2.2 and the other has v3.0.0
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 running the provided imshow reproduction and reading the imshow entry point and its transform handling. Determine the intended behavior for transform=None, then document that behavior and its consequences in the relevant Matplotlib documentation; done means the documented behavior matches the confirmed result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100