add option to add "select" mode on any figure (specifically, Heatmap)
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
從 go.FigureWidget 範例開始,聚焦於 issue 中描述的 layout.dragmode、modebar 選項,以及 go.Heatmap 互動。檢查當圖表只包含 Heatmap 時,選取回呼和選取邊界是如何提供的。完成的標準是:無需加入虛設的 go.Scatter,即可透過 modebar 在 pan 或 zoom 與 select 之間切換。
由索引模型根據 Issue 內容生成。
描述
It doesn't seem possible to add a "select" dragmode to a figure with a go.Heatmap object. You can specify the starting dragmode as "select", in which case you can immediately drag and select. But if I wanted to pan, I can't choose to select afterwards. I cannot add it to the modebar. I would like to be able to do this so I can select a region of interest on my heatmap, and setup a callback to set this region of interest in my code. I don't care about actually selecting the points in the heatmap, just the bounds of the selection box.
My workaround to this is to add a go.Scatter to my figure:
layout = go.Layout(
showlegend=False,
autosize=False,
xaxis=dict(
showgrid=False,
zeroline=False,
visible=False,
range=[0, images.shape[2] - 1],
),
yaxis=dict(
showgrid=False,
zeroline=False,
visible=False,
range=[images.shape[1] - 1, 0],
scaleanchor="x",
scaleratio=1,
),
dragmode="zoom",
modebar=go.layout.Modebar(remove=["lasso"]),
)
heat = go.FigureWidget(
data=[
go.Scatter(
x=[0],
y=[0],
),
go.Heatmap(z=current_image, colorscale="Viridis"),
],
layout=layout,
)
This works, but is kind of silly...
- 主要語言
- Python
- 星號
- 18.8k
- 分支
- 2.8k
- 平均合併
- 16 小時 26 分鐘
- 30 天內合併 PR
- 21
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.py 的其他 Issue
-
P3 size: 1 task
難度 2/5 1-3 小時 新手友好度 72/100
-
bug P1
難度 1/5 1 小時以內 新手友好度 68/100
-
feature P3
難度 2/5 1-3 小時 新手友好度 62/100
-
feature P3
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難度 2/5 1-3 小時 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
zilliztech/memsearch#759 ·