When I set "color=" to column from my dataframe but applying any function to it - I got in fig. legend just 'color'.
Cant figure out how to set it manually if I need to set custom color, not just existing column from my dataset.
df = pd.DataFrame({'x':[1,2,3,4,5,6,7],'y':[1,2,3,4,5,6,7],'color':[-100,0,1,1000,5000,3000,7000]})
fig = px.scatter(df, x='x', y='y'
,size=df.groupby(by=['y','x'])['y'].transform('count')
#,color=df['color']
,color=df['color'].apply(np.log)
,color_continuous_scale=px.colors.sequential.Inferno
,opacity=0.7
)
fig.show()
Thank you.