We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2ca775 commit 603d261Copy full SHA for 603d261
src/axiomatic/pic_helpers.py
@@ -121,7 +121,11 @@ def plot_interactive_spectra(
121
122
# Defaults
123
if spectrum_labels is None and isinstance(spectra, dict):
124
+ if isinstance(list(spectra.keys())[0], str) and all("," in key for key in spectra.keys()):
125
+ spectrum_labels = [f"T {port_in} -> {port_out}" for port_in, port_out in spectra.keys()]
126
+ elif isinstance(list(spectra.keys())[0], tuple) and len(list(spectra.keys())[0]) == 2:
127
spectrum_labels = [f"T {port_in} -> {port_out}" for port_in, port_out in spectra.keys()]
128
+
129
elif spectrum_labels is None:
130
spectrum_labels = [f"Spectrum {i}" for i in range(len(spectra))]
131
if vlines is None:
0 commit comments