I made scatter_geo plot in Python within plotly.
import plotly.express as px
import pandas as pd
rows=[['501-600','65','122.58333','45.36667'],
['till 500','54','12.5','27.5'],
['more 1001','51','-115.53333','38.08'],
['601-1000','54','120.54167','21.98'],
]
colmns=['bins','data','longitude','latitude']
df=pd.DataFrame(data=rows, columns=colmns)
fig=px.scatter_geo(df,lon='longitude', lat='latitude',color='bins',
opacity=0.5,
projection="natural earth")
fig.show()
Are there any possibility to make customise order in legend labels if I have only one trace of data?
Coz now labels in legend looks like this:
501-600
till 500
more 1001
601-1000
Dut I need to make them looks like that:
till 500
501-600
601-1000
more 1001