@@ -584,6 +584,7 @@ def error_plot_in_degrees(array1: np.ndarray, array2: np.ndarray) -> np.ndarray:
584
584
# For 'errors', only persistence and increments need identical colorbar-limits
585
585
combined_error = np .concatenate (((pred - input_ ), (truth - input_ )))
586
586
norm = Normalize (vmin = np .nanmin (combined_data ), vmax = np .nanmax (combined_data ))
587
+ norm_error = TwoSlopeNorm (vmin = np .nanmin (combined_error ), vcenter = 0.0 , vmax = np .nanmax (combined_error ))
587
588
single_plot (fig , ax [1 ], lon , lat , truth , norm = norm , title = f"{ vname } target" , datashader = datashader )
588
589
single_plot (fig , ax [2 ], lon , lat , pred , norm = norm , title = f"{ vname } pred" , datashader = datashader )
589
590
single_plot (
@@ -688,7 +689,7 @@ def error_plot_in_degrees(array1: np.ndarray, array2: np.ndarray) -> np.ndarray:
688
689
lat ,
689
690
pred - input_ ,
690
691
cmap = "bwr" ,
691
- norm = TwoSlopeNorm ( vmin = combined_error . min (), vcenter = 0.0 , vmax = combined_error . max ()) ,
692
+ norm = norm_error ,
692
693
title = f"{ vname } increment [pred - input]" ,
693
694
datashader = datashader ,
694
695
)
@@ -699,7 +700,7 @@ def error_plot_in_degrees(array1: np.ndarray, array2: np.ndarray) -> np.ndarray:
699
700
lat ,
700
701
truth - input_ ,
701
702
cmap = "bwr" ,
702
- norm = TwoSlopeNorm ( vmin = combined_error . min (), vcenter = 0.0 , vmax = combined_error . max ()) ,
703
+ norm = norm_error ,
703
704
title = f"{ vname } persist err" ,
704
705
datashader = datashader ,
705
706
)
0 commit comments