Update method for slider / buttons working?


I’m trying to create a plot with a slider or a series of buttons that changes both marker color and layout of annotations at the same time. I thought that method = 'update' should be used for changing layout and data attributes, but it only seems to change layout. The only method that seems to change marker color is 'restyle'.

I assume updating both attributes is possible based on the Yahoo example in https://plot.ly/r/custom-buttons/, but I cannot reproduce the code.

To stress, the slider/button has to change both attributes in one go (i.e. I can’t have one slider for marker color and another for annotation layout).

I can provide a reproducible example, but want to first check whether it is possible to add interactive controls in R that change data and layout attributes simultaneously.

Many thanks