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:

See the corresponding MATLAB code:

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:


That’s great. Thanks for your reply.