File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def plot_single_spectrum(
9797 ) # Add vertical line
9898 for y_val in hlines :
9999 plt .axhline (
100- x = y_val , color = "red" , linestyle = "--" , label = f"Transmission (y={ y_val } )"
100+ y = y_val , color = "red" , linestyle = "--" , label = f"Transmission (y={ y_val } )"
101101 ) # Add vertical line
102102 return plt .gcf ()
103103
@@ -141,6 +141,8 @@ def plot_interactive_spectra(
141141 # Calculate global y-limits across all arrays
142142 y_min = min (min (min (arr2 ) for arr2 in arr1 ) for arr1 in spectra )
143143 y_max = max (max (max (arr2 ) for arr2 in arr1 ) for arr1 in spectra )
144+ y_min = min (hlines + [y_min ])* 0.95
145+ y_max = max (hlines + [y_max ])* 1.05
144146
145147 slider_index = slider_index or list (range (len (spectra [0 ])))
146148 spectrum_labels = spectrum_labels or [f"Spectrum { i } " for i in range (len (spectra ))]
@@ -159,7 +161,7 @@ def plot_array(index=0):
159161 ) # Add vertical line
160162 for y_val in hlines :
161163 plt .axhline (
162- x = y_val , color = "red" , linestyle = "--" , label = f"Transmission (y={ y_val } )"
164+ y = y_val , color = "red" , linestyle = "--" , label = f"Transmission (y={ y_val } )"
163165 ) # Add vertical line
164166 plt .title (f"Iteration: { index } " )
165167 plt .xlabel ("X" )
You can’t perform that action at this time.
0 commit comments