Interactive Legends

Can anyone tell me if it is possible to create interactive legends on graphs in plotly? i.e., a drop-down menu on the chart that changes the chart display depending on the category that is selected. Any help would be greatly appreciated.

Here’s an example: https://plot.ly/~chelsea_lyn/12871.embed

See the corresponding MATLAB code: https://plot.ly/~chelsea_lyn/12871.m

Dropdowns menu are a new feature to plotly; so we haven’t had the chance to write a MATLAB tutorial for them. In the meantime, you might want to look at our python tutorial here: https://plot.ly/python/dropdowns/

That’s great. Thanks for your reply.

The .embed version of this still works. When I execute the linked Matlab code the plot opens as it should, but the dropdown selection results in an empty plot:
https://plot.ly/~schmid/40/
Related to the topic that I just posted - I cannot figure out how to get the updatemenus to work: Updatemenus Matlab

'found out how to get the Matlab version running. The args needs a curly brace instead of square, i.e. replace
‘args’, { {‘visible’, [true, true, true, true]} }
with
‘args’, { {‘visible’, {true, true, true, true}} }, …