Compare commits

...

2 Commits

Author SHA1 Message Date
Alejandro Moreo Fernandez 8c063afd1e merged from devel 2025-12-10 12:06:03 +01:00
Alejandro Moreo Fernandez befe7503bd merged from devel 2025-12-10 12:05:10 +01:00
1 changed files with 5 additions and 7 deletions

View File

@ -293,10 +293,7 @@ def error_by_drift(method_names, true_prevs, estim_prevs, tr_prevs,
# x_error function) and 'y' is the estim-test shift (computed as according to y_error)
data = _join_data_by_drift(method_names, true_prevs, estim_prevs, tr_prevs, x_error, y_error, method_order)
if method_order is None:
method_order = method_names
# _set_colors(ax, n_methods=len(method_order))
_set_colors(ax, n_methods=len(method_order))
bins = np.linspace(0, 1, n_bins+1)
binwidth = 1 / n_bins
@ -366,9 +363,10 @@ def error_by_drift(method_names, true_prevs, estim_prevs, tr_prevs,
ax.set_ylim(0,10 ** math.ceil(math.log10(max_y)))
if show_legend:
fig.legend(loc='center left',
bbox_to_anchor=(1, 0.5),
ncol=1)
ax.legend(loc='center right', bbox_to_anchor=(1.31, 0.5))
# fig.legend(loc='lower center',
# bbox_to_anchor=(1, 0.5),
# ncol=(len(method_names)+1)//2)
_save_or_show(savepath)