I observe some weird behavior with Drawing a standard TH1F histogram.
In general I have 3 histograms, of which I want one to be drawn with “HIST” option and the other two as data points above. All are drawn on a 4th template histogram
My starting point was:
h1_template->Draw(“9”);
h1_one->Draw(“9 SAME HIST”);
h1_two->Draw(“9 SAME”);
h1_three->Draw(“9 SAME”);
This results in a canvas, showing all setting by the empty template histogram and the h1_one entries as HIST style. But h1_two and h1_three Data points are missing.
Dropping the “9” option draws all three histograms with HIST option, no matter if HIST is defined in Draw options or not.
Drawing all three options with the default option Draw("") produces an empty histogram, just showing the template (axis and labels).
Isn’t it explicitly written there for the option “9” … This option should be combined with a “drawing option” like “H” or “L”.
BTW. If you draw all histograms using empty “drawing options” strings, just the last histogram (“h1_three”) will be visible, so what you will get depends on what this histogram actually contains.
Yes thats why I removed the “9” option to check it!
I know I need the SAME option to draw multiple histograms in one Canvas, what I meant with draw option here are options modifying the appearance of the histogram.
I SHOULD get 3 histograms with data points, right? Instead I get three histograms in HIST style, even though I did NOT specify the HIST option!? That is my problem.
Everything depends on what your histograms actually contain.
For example, do they have “errors” or do they not (again, read the description of the “HIST” option).
Or maybe a “default drawing option” for them has been set using TH1::SetOption.