If a user attempts to draw a TF1
that is undefined in part of its range, it is drawn as a flat line at 0 without throwing an error. If 0 is outside the Yaxis range, the user is left with no graphics and no error to help them debug. Reproducer follows.
It would be nice if drawing an undefined value raised an error.
import ROOT as r
# define coordinates
# note that 0 is outside the Yaxis range
h = r.TH2F("h", "h", 100, 1, 101, 100, 0, 100)
h.Draw()
# declare function that evaluates to NaN in part of its range
f = r.TF1("f", "sqrt(50 - x) * 10", 0, 100)
f.Draw("same")
# f is not shown and no error is raised
ROOT Version: 6.22/06
Platform: macOS
Compiler: conda-forge