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(
119119 A list of y-values where horizontal lines should be drawn. Defaults to an empty list.
120120 """
121121
122+ hlines = hlines or []
123+
122124 # Convert wavelengths to nm
123125 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 []
125127
126128 if isinstance (spectra , dict ):
127129 port_keys = []
@@ -142,10 +144,6 @@ def plot_interactive_spectra(
142144
143145 elif spectrum_labels is None :
144146 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 = []
149147
150148 if isinstance (spectra , dict ):
151149 spectra = list (spectra .values ())
You can’t perform that action at this time.
0 commit comments