plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.38k stars 2.56k forks source link

plotly.express.scatter_geo shows values provided to text argument in the hoverinfo instead of printing them on the map #2575

Open MdoubleDash opened 4 years ago

MdoubleDash commented 4 years ago

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()

image

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

mkleinbort commented 4 years ago

I have the same problem.

wico-jourdan commented 3 years ago

I also have the same problem

gvwilson commented 3 months ago

@archmoj will your recent work address this?

asadow commented 1 month ago

Any news on this?

archmoj commented 1 month ago

@LiamConnors Could you please replicate this in a codepen?