@@ -76,9 +76,9 @@ def _extract_plot_data(event_data: PlotEventData, q4: bool, show_error_bar: bool
7676 for j in range (len (sld )):
7777 results ["sld" ][- 1 ].append ([sld [j ][:, 0 ], sld [j ][:, 1 ]])
7878
79+ results ["sld_resample" ].append ([])
7980 if event_data .resample [i ] == 1 or event_data .modelType == "custom xy" :
8081 layers = event_data .resampledLayers [i ][0 ]
81- results ["sld_resample" ].append ([])
8282 for j in range (len (event_data .resampledLayers [i ])):
8383 layer = event_data .resampledLayers [i ][j ]
8484 if layers .shape [1 ] == 4 :
@@ -198,15 +198,14 @@ def plot_ref_sld_helper(
198198 sld_min , sld_max = confidence_intervals ["sld" ][i ][j ]
199199 sld_plot .fill_between (plot_data ["sld" ][i ][j ][0 ], sld_min , sld_max , alpha = 0.6 , color = "grey" )
200200
201- if plot_data ["sld_resample" ]:
202- for j in range (len (plot_data ["sld_resample" ][i ])):
203- sld_plot .plot (
204- plot_data ["sld_resample" ][i ][j ][0 ],
205- plot_data ["sld_resample" ][i ][j ][1 ],
206- color = color ,
207- linewidth = 1 ,
208- animated = animated ,
209- )
201+ for j in range (len (plot_data ["sld_resample" ][i ])):
202+ sld_plot .plot (
203+ plot_data ["sld_resample" ][i ][j ][0 ],
204+ plot_data ["sld_resample" ][i ][j ][1 ],
205+ color = color ,
206+ linewidth = 1 ,
207+ animated = animated ,
208+ )
210209
211210 # Format the axis
212211 ref_plot .set_yscale ("log" )
@@ -544,11 +543,10 @@ def update_foreground(self, data):
544543 self .figure .axes [1 ].draw_artist (self .figure .axes [1 ].lines [i ])
545544 i += 1
546545
547- if plot_data ["sld_resample" ]:
548- for resampled in plot_data ["sld_resample" ][j ]:
549- self .figure .axes [1 ].lines [i ].set_data (resampled [0 ], resampled [1 ])
550- self .figure .axes [1 ].draw_artist (self .figure .axes [1 ].lines [i ])
551- i += 1
546+ for resampled in plot_data ["sld_resample" ][j ]:
547+ self .figure .axes [1 ].lines [i ].set_data (resampled [0 ], resampled [1 ])
548+ self .figure .axes [1 ].draw_artist (self .figure .axes [1 ].lines [i ])
549+ i += 1
552550
553551 for i , container in enumerate (self .figure .axes [0 ].containers ):
554552 self .adjust_error_bar (
0 commit comments