From 24ccc77eccbc528fec87a38353d8f3d16476d410 Mon Sep 17 00:00:00 2001 From: Adrian Peter Krone Date: Fri, 13 Dec 2024 20:32:04 +0100 Subject: [PATCH] Removed success message --- src/iminuit/qtwidget.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/iminuit/qtwidget.py b/src/iminuit/qtwidget.py index 94897070..b4ae1759 100644 --- a/src/iminuit/qtwidget.py +++ b/src/iminuit/qtwidget.py @@ -306,14 +306,12 @@ def plot_with_frame(self, from_fit, report_success): fontsize="x-large", ) if from_fit and report_success: - plt.text( - 0.95, - 1.05, - f"{'success' if minuit.valid and minuit.accurate else 'FAILURE'}", - transform=trans, - fontsize="x-large", - ha="right", + self.results_text.clear() + self.results_text.setHtml( + f"
{minuit.fmin._repr_html_()}
" ) + else: + self.results_text.clear() def fit(self): if self.algo_choice.currentText() == "Migrad": @@ -336,14 +334,6 @@ def on_parameter_change(self, from_fit=False, report_success=False): report_success = self.do_fit(plot=False) minuit.fixed = saved - if from_fit: - self.results_text.clear() - self.results_text.setHtml( - f"
{minuit.fmin._repr_html_()}
" - ) - else: - self.results_text.clear() - plt.clf() self.plot_with_frame(from_fit, report_success) self.canvas.draw_idle()