How to have different dot sizes in legend and dots in scatter plots using Dash + plotly? -


i'm trying build scatter plot using dash+plotly.

in scatter plot want draw dots different sizes. problem these changes in sizes affect size of dots within legend (see awful legend picture below).

enter image description here

this source code have until now:

'data':[                 go.scatter(                     x=[filtered_df[filtered_df['executedtreatment'] == treatment][selected_columns[0]].mean()],                     y=[filtered_df[filtered_df['executedtreatment'] == treatment][selected_columns[1]].mean()],                     mode='markers',                     opacity=0.7,                     marker={                         'size': filtered_df[filtered_df['executedtreatment'] == treatment].shape[0],                         'symbol': 'dot',                     },                     name=names[i]                 ) i, treatment in enumerate(df.executedtreatment.unique())              ],              'layout': go.layout(                  title="number of cases: {} (scenario '{}')".format(filtered_df.shape[0], scenario),                  xaxis={'title':selected_columns[0]},                  yaxis={'title':selected_columns[1]},                  showlegend=true,                  font=dict(size=12),                  titlefont={'color': '#000000', 'size': 14.4},                   hovermode='closest',             ) 

what want achieve have different dot sizes in scatter plot, fixed sized dots within legend. there parameter can provide layout object in order set fixed size dots in legend? if not...any other solution?


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -