Python plotly.express – add labels in scatter_geo
Python plotly.express – add labels in scatter_geo Question: I need to add static labels on markers in scatter_geo vizualization. I added text=’data’, but nothing had happend: import plotly.express as px import pandas as pd rows=[[‘501-600′,’15’,’122.58333′,’45.36667′], [’till 500′,’4′,’12.5′,’27.5′], [‘more 1001′,’41’,’-115.53333′,’38.08′], ] colmns=[‘bins’,’data’,’longitude’,’latitude’] df=pd.DataFrame(data=rows, columns=colmns) df = df.astype({“data”: int}) fig=px.scatter_geo(df,lon=’longitude’, lat=’latitude’, color=’bins’, text=’data’, opacity=0.5,size=’data’, projection=”natural earth”) fig.show() …