plotly / plotly/plotly.py

range is only working on the x Axis

未关闭
#3,542 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
Python
星标
18.8k
派生
2.8k
平均合并
16 小时 26 分钟
30 天内合并 PR
21

描述

When using facets and setting binary_string to False it's not possible to select a range on the y-axis. It works on the x-axis and also when binary_string is set False.

import plotly.express as px
import numpy as np
from skimage import data, filters, img_as_float
img = data.camera()
sigmas = [1, 2, 4]
img_sequence = [filters.gaussian(img, sigma=sigma) for sigma in sigmas]
fig = px.imshow(np.array(img_sequence), facet_col=0, binary_string=False,
                labels={'facet_col':'sigma'})
# Set facet titles
for i, sigma in enumerate(sigmas):
    fig.layout.annotations[i]['text'] = 'sigma = %d' %sigma
    
fig.update_layout(
    xaxis=dict(
        range = [200, 300]
    ),
    yaxis=dict(
        range = [200, 300]
    ),
)    
fig.show()

newplot (51)

贡献指南

打开贡献指南

从这里开始

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

调研方向

从提供的 px.imshow 复现开始,重点关注 binary_string=False 的分面图像以及 xaxis/yaxis 范围设置。在一个聚焦的测试或复现中验证行为,并在这些条件下 y-axis 范围选择与 xaxis 行为一致时,认为该 issue 已完成。

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

评估

技术栈
python
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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