I am updating a scatter plot using updatemenus that take as arguments the fields I want to update:
dict(label = category, method = 'update', args = [dict(x=[df[(df['cat_name'] == category) & (df['cat_level'] == cat_level)]['value']], y=[df[(df['cat_name'] == category) & (df['cat_level'] == cat_level)]['count']], meta = [["Category:" + category]] )])
I have a second trace that I’m adding (it’s a best fit line), that I would like to have update as the menu choice change (when the user selects a menu
category the visual updates with that category data - therefore the line of best fit should change).
Is there a smart way to construct this?