From 7bcf8b24e9e08b05c3390f3667cb3482dfe93c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Gonz=C3=A1lez?= Date: Mon, 16 Jan 2023 17:17:02 +0100 Subject: [PATCH] fixing bug --- quapy/plot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quapy/plot.py b/quapy/plot.py index 7d032f1..794fd4c 100644 --- a/quapy/plot.py +++ b/quapy/plot.py @@ -309,11 +309,11 @@ def error_by_drift(method_names, true_prevs, estim_prevs, tr_prevs, for vline in vlines: ax.axvline(vline, 0, 1, linestyle='--', color='k') - if not show_legend: - ax.get_legend().remove() ax.set_xlim(min_x, max_x) - ax.legend(loc='center left', bbox_to_anchor=(1, 0.5)) + + if not show_legend: + ax.legend(loc='center left', bbox_to_anchor=(1, 0.5)) _save_or_show(savepath)