We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 324b70a commit 5396eddCopy full SHA for 5396edd
src/axiomatic/pic_helpers.py
@@ -119,9 +119,11 @@ def plot_interactive_spectra(
119
A list of y-values where horizontal lines should be drawn. Defaults to an empty list.
120
"""
121
122
+ hlines = hlines or []
123
+
124
# Convert wavelengths to nm
125
wavelengths = [wl*1e3 for wl in wavelengths]
- vlines = [wl*1e3 for wl in vlines]
126
+ vlines = [wl*1e3 for wl in vlines] if vlines else []
127
128
if isinstance(spectra, dict):
129
port_keys = []
@@ -142,10 +144,6 @@ def plot_interactive_spectra(
142
144
143
145
elif spectrum_labels is None:
146
spectrum_labels = [f"Spectrum {i}" for i in range(len(spectra))]
- if vlines is None:
- vlines = []
147
- if hlines is None:
148
- hlines = []
149
150
151
spectra = list(spectra.values())
0 commit comments