diff --git a/plothist/plothist_style.py b/plothist/plothist_style.py index 5693d798..51684616 100644 --- a/plothist/plothist_style.py +++ b/plothist/plothist_style.py @@ -248,14 +248,14 @@ def add_text( x = 0.0 elif x=="right": x = 1.0 - elif type(x)!=float or type(x)!=int: + elif type(x)!=float and type(x)!=int: raise ValueError(f"x should be a float or 'left'/'right' ({x} given))") if y=="top": y = 1.01 elif y=="bottom": y = 0.0 - elif type(y)!=float or type(y)!=int: + elif type(y)!=float and type(y)!=int: raise ValueError(f"y should be a float or 'top'/'bottom' ({y} given)") t = ax.text(