From 4528328d5ec006e54104020e4ec664ff594fc907 Mon Sep 17 00:00:00 2001 From: nrad Date: Wed, 21 Dec 2022 17:53:31 +0100 Subject: [PATCH] Update plotting.py --- src/pyroofit/plotting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyroofit/plotting.py b/src/pyroofit/plotting.py index fb7f2cc..7eaca18 100644 --- a/src/pyroofit/plotting.py +++ b/src/pyroofit/plotting.py @@ -341,11 +341,11 @@ def fast_plot(model, data, observable, filename, components=None, nbins=None, ex if extra_text is not None: canvas.cd(1) - if isinstance(extra_text, ROOT.TPaveText): - extra_info.Draw("Same") + if hasattr(extra_text, "Draw"): + extra_text.Draw("Same") if isinstance(extra_text, list): for txt in extra_text: - assert isinstance(txt, ROOT.TPaveText), "Please provide extra_txt with a list or ROOT.TPaveText" + assert hasattr(txt, "Draw"), "Please provide extra_txt with as a ROOT object with Draw method" txt.Draw("Same") if extra_info is not None: