enable multiple hover boxes for overlapping/multiple points
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
This has been tested in version 4.7.1.
When hover information is shown for points e.g. in a scatter plot, the following situations can occur:
- there are multiple points on exactly the same coordinates
- there are multiple points close to the same coordinates and the markers used to visualize those points overlap in the graph
Hover information for all those multiple points should be shown, especially in cases where the hover information includes additional data not shown directly in the graph.
The hvPlot library does this correctly: it shows stacked hover boxes for all the data points under the cursor. Plotly only shows one hover box and it is not clear which one.
I think this is an actual bug since it makes it easy to miss data and the hover information does not represent the actual data in the graph.
Here is an example using the Iris data set and Plotly:
import plotly.express as px
from bokeh.sampledata import iris
df = iris.flowers.copy()
fig = px.scatter(df, x="sepal_length", y="sepal_width", color="species",
opacity=0.4, hover_data=["petal_length", "petal_width"]
)
fig.show()
This shows:

With hvPlot:
df.hvplot(kind="scatter",
x="sepal_length", y="sepal_width", by="species",
hover_cols=["petal_length", "petal_width"],
alpha=0.4)

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されている iris データセットと px.scatter の例を使って重なっている点の挙動を再現し、その後 hvPlot の結果と比較します。fig.show() が一致する点または重なっている点の hover 情報をどのようにレンダリングするかを追跡し、関連する Plotly コンポーネントの境界を特定します。カーソル下にあるすべての点が区別可能な hover 情報を受け取り、完全一致する重なりと近接した重なりの両方についてリグレッションテストのカバレッジがあることを完了条件とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 28/100