I can’t explain what’s happening other than posting an example.
KstJPsEE_L0H_fitAndRes.pdf (32 KB)
I’m trying to draw “stacked” backgrounds with the filled style.
Fist one background and the the sum of the first and second background,
then the sum of first second and third, etc.
The thing works. If I just plot lines everything is fine.
But if I use the fill style it seems RooFit draws a line connecting
the points at the extremes and the colors the difference between
my PDF and that line. What am I doing wrong?
The code line is
model->plotOn(frame, range2, Components(curBkg), DrawOption("F"),
Instead the following, using just lines works perfectly
model->plotOn(frame, Components(curBkg), range2, DrawOption("L"),