Imshow behaviour incorrect with log scale on yaxis
未关闭
还没有人认领这个 Issue。
bug
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
Plotly version: 5.15.0
I'm passing some values to the yaxis of px.imshow. If I just plot it as-is it's fine
import plotly.express as px
fig = px.imshow(
img = [[1,2], [3,4], [5,6]],
x = ['A', 'B'],
y = [10, 100, 1000],
text_auto=True,
width=600
)
fig.update_yaxes(autorange='reversed')
But if I change the yaxis type to log using fig.update_yaxis, the first row of data disappears
import plotly.express as px
fig = px.imshow(
img = [[1,2], [3,4], [5,6]],
x = ['A', 'B'],
y = [10, 100, 1000],
text_auto=True,
width=600
)
fig.update_yaxes(type='log', autorange='reversed')
Playing around with the yaxis values doesn't seem to affect this behaviour
Note: It seems to depend only on the closeness of the first and second yaxis values
VS
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从使用 px.imshow 和 fig.update_yaxes(type='log', autorange='reversed') 的可复现 Python 示例开始,然后将对数刻度渲染结果与线性刻度结果进行比较。当对于报告的 y 轴值,第一行仍保持可见,同时反向 autorange 和对数缩放仍能正确工作时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100