All the dropdown (or slider) examples show modifications to data. However, shapes are placed in layout, so I don’t know how can I access them through updatemenus.
I.e., if I have two shapes and want to switch between them with a dropdown, I would like to write something like:
The solution works perfectly but now when the data should also change with the button click (hence using the visible keyword as well), I cannot make it work, and I can’t understand why: ‘update’ should relayout and restyle, right?
For me, using update in combination with shapes does not work.
If I take the example provided in the documentation (https://plotly.com/python/custom-buttons/#relayout-button), I can use the buttons to toggle the shapes. However, when I change the method from relayout to update, nothing is updated.