Describe the bug
After plotting a spectrum with multiple annotations and deselecting some of annotations in random order will give funny results. Might have to do with the way we are currently plotting data.
Solution
Instead of duplicating each data point three times (1. normal data point (mz/i), 2. zero I data point (mz, 0) and 3. line breaking point (mz+x, None) ) we could "misuse" the error bars.
This example will produce the wanted "stick" representation with only one data point and stops plotly to be confused about annotations:
Describe the bug After plotting a spectrum with multiple annotations and deselecting some of annotations in random order will give funny results. Might have to do with the way we are currently plotting data.
Solution Instead of duplicating each data point three times (1. normal data point (mz/i), 2. zero I data point (mz, 0) and 3. line breaking point (mz+x, None) ) we could "misuse" the error bars.
This example will produce the wanted "stick" representation with only one data point and stops plotly to be confused about annotations: