@@ -15,13 +15,13 @@ def calibration_ecdf(
1515 variable_keys : Sequence [str ] = None ,
1616 variable_names : Sequence [str ] = None ,
1717 test_quantities : dict [str , Callable ] = None ,
18- difference : bool = False ,
18+ difference : bool = True ,
1919 stacked : bool = False ,
2020 rank_type : str | np .ndarray = "fractional" ,
2121 figsize : Sequence [float ] = None ,
2222 label_fontsize : int = 16 ,
2323 legend_fontsize : int = 14 ,
24- legend_location : str = "upper right" ,
24+ legend_location : str = "lower right" ,
2525 title_fontsize : int = 18 ,
2626 tick_fontsize : int = 12 ,
2727 rank_ecdf_color : str = "#132a70" ,
@@ -59,7 +59,7 @@ def calibration_ecdf(
5959 The posterior draws obtained from n_data_sets
6060 targets : np.ndarray of shape (n_data_sets, n_params)
6161 The prior draws obtained for generating n_data_sets
62- difference : bool, optional, default: False
62+ difference : bool, optional, default: True
6363 If `True`, plots the ECDF difference.
6464 Enables a more dynamic visualization range.
6565 stacked : bool, optional, default: False
@@ -98,7 +98,9 @@ def calibration_ecdf(
9898 label_fontsize : int, optional, default: 16
9999 The font size of the y-label and y-label texts
100100 legend_fontsize : int, optional, default: 14
101- The font size of the legend text
101+ The font size of the legend text.
102+ legend_location : str, optional, default: 'lower right
103+ The location of the legend.
102104 title_fontsize : int, optional, default: 18
103105 The font size of the title text.
104106 Only relevant if `stacked=False`
@@ -211,11 +213,13 @@ def calibration_ecdf(
211213 else :
212214 titles = ["Stacked ECDFs" ]
213215
214- for ax , title in zip (plot_data ["axes" ].flat , titles ):
216+ for i , ( ax , title ) in enumerate ( zip (plot_data ["axes" ].flat , titles ) ):
215217 ax .fill_between (z , L , U , color = fill_color , alpha = 0.2 , label = rf"{ int ((1 - alpha ) * 100 )} $\%$ Confidence Bands" )
216- ax .legend (fontsize = legend_fontsize , loc = legend_location )
217218 ax .set_title (title , fontsize = title_fontsize )
218219
220+ if i == 0 :
221+ ax .legend (fontsize = legend_fontsize , loc = legend_location )
222+
219223 prettify_subplots (plot_data ["axes" ], num_subplots = plot_data ["num_variables" ], tick_fontsize = tick_fontsize )
220224
221225 add_titles_and_labels (
0 commit comments