plotly.express.scatter_geo shows values provided to text argument in the hoverinfo instead of printing them on the map
オープン
まだ誰も着手していません。
bug
P3
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
I am trying to label some of the points on my scatter map using plotly.express.scatter_geo and text argument. I think there's a bug that causes text to be picked up for hoverinfo instead of the labels. See the reproducible example below:
import plotly.express as px
df = px.data.gapminder().query("year == 2007")
fig = px.scatter_geo(df, locations="iso_alpha",
color="continent", # which column to use to set the color of markers
hover_name="country", # column added to hover information
size="pop", # size of markers
projection="natural earth",
text="lifeExp")
fig.show()

I was expecting the values as labels for each point in reference to documentation: https://plotly.com/python-api-reference/generated/plotly.express.scatter_geo.html
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
plotly.express.scatter_geo を使用した再現可能な Python 例から始め、ドキュメントに記載された text 引数を、生成されたマップおよびホバーの動作と比較します。scatter_geo のエントリーポイントを追跡し、text がポイントラベルとしてレンダリングされる代わりに hoverinfo に送られる理由を特定します。提供された値がマップ上のラベルとして表示され、既存のホバー情報が正しいままであれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100