matplotlib / matplotlib/matplotlib

Document idiosyncratic behavior of `transform` kwarg

未关闭
#12,551 13 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Documentation keep
主要语言
Python
星标
23.2k
派生
8.5k
平均合并
1 天 6 小时
30 天内合并 PR
66

描述

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

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
image

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先运行提供的 imshow 复现,并阅读 imshow 入口点及其对 transform 的处理。确定 transform=None 的预期行为,然后在相关的 Matplotlib 文档中记录该行为及其后果;当文档中描述的行为与已确认的结果一致时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data-visualization
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。