plotly / plotly/plotly.py

"x unified" Does not show all data info at same X

未關閉
#3,606 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

bug P3
主要語言
Python
星號
18.8k
分支
2.8k
平均合併
16 小時 26 分鐘
30 天內合併 PR
21

描述

Environment:

Python 3.9.5
plotly.py v5.6.0
VS Code Jupyter Environment

How it is now

fig = px.scatter(result_df, x=[1, 2, 2, 3], y=[1, 2, 3, 4])
fig.update_traces(mode="markers", hovertemplate=None)
fig.update_layout(hovermode="x unified")
fig.show()
image As shown above, the hover box only displayed 1 y-axis value.

How it should be

image

The hover box should display all y-axis values at the same X, even if they are the same type, in my example scatter plot.
As demonstrated in the document, plotly has the capability to show all values at the same X. But unfortunately it only works when there are another data dimension involved.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先使用 px.scatter、update_traces 和 hovermode="x unified" 建立最小 Python 重現,然後將其行為與連結的懸停文字文件進行比較。調查為什麼位於同一個 X 的重複點在懸停框中只產生一個 Y 值。對於範例情況,如果懸停框顯示該 X 對應的每個 Y 軸值,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
jupyter-notebook, python
領域
data-visualization
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。