File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,11 @@ def plot_interactive_spectra(
119
119
A list of y-values where horizontal lines should be drawn. Defaults to an empty list.
120
120
"""
121
121
122
+ hlines = hlines or []
123
+
122
124
# Convert wavelengths to nm
123
125
wavelengths = [wl * 1e3 for wl in wavelengths ]
124
- vlines = [wl * 1e3 for wl in vlines ]
126
+ vlines = [wl * 1e3 for wl in vlines ] if vlines else []
125
127
126
128
if isinstance (spectra , dict ):
127
129
port_keys = []
@@ -142,10 +144,6 @@ def plot_interactive_spectra(
142
144
143
145
elif spectrum_labels is None :
144
146
spectrum_labels = [f"Spectrum { i } " for i in range (len (spectra ))]
145
- if vlines is None :
146
- vlines = []
147
- if hlines is None :
148
- hlines = []
149
147
150
148
if isinstance (spectra , dict ):
151
149
spectra = list (spectra .values ())
You can’t perform that action at this time.
0 commit comments