aspect="auto" for px.imshow does nothing when plotting RGB data
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
I am trying to plot an RGB image that strecthes to fill the figure, and I cannot get it to work.
Using a standard 2D array works as expected, and the image is able to dynamically stretch to the figure.
arr = np.random.random((100, 100))
px.imshow(arr, aspect="auto")
But if I instead try to plot an RGB image with the same settings, then the image stays with its original aspect ratio.
img = np.random.random((100, 100, 3))
px.imshow(img, aspect="auto")
In this case, setting the aspect key does nothing and the image keeps a fixed aspect ratio. Explicitly adding with and height also does nothing to change the aspect ratio.
Is this an expected limitation of the aspect setting? If yes, then it should probably be documented.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中的 px.imshow 示例开始,比较 2D-array 和 RGB-array 路径,重点关注 aspect="auto" 的处理方式。完成的标准是 RGB 图像能够按预期拉伸,或者记录该限制及其对宽度和高度的影响。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- numpy, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100