This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| I'm sure others have figured this out, too, but on a search I found no answers on any fora that actually addressed how to use | |
| Plotly's built-in features to show individual traces without impacting the visibility of the others. The example is taken directly | |
| from an interactive I made (you can see the example here: https://questdwarfs.github.io/assets/html/quest_compare_spectra.html), so | |
| some of what is here will be extraneous for the one point (and I'm sure there are inefficiencies here as I only ever use Plotly | |
| occasionally). The steps are roughly: | |
| 1) generate your traces with visibility toggled off (this is also part of the Plotly tutorial) | |
| 2) instead of using *update* in your dropdown, you'll use *relayout*, which will let you specify which tracers are impacted | |
| when you change visible to True for the trace of interest |