It perfectly normalized histogram but when I write this normalized histogram in a root file using
h->Write();
then histogram draws with error bar and without line but I want to draw histogram without error bar and with a line. Can you suggest how can I do that?[qinv_test.pdf|attachment]
Hey Yus,
Thank you so much. I tried it, it is working but if I want to write this histogram in a root file then it doesnāt work their. Alternatively I can do like later I can read this root file and h->Draw(""HIST); which is working but I tried to write this in the root file with line and without error bar.
You canāt write a histogram in a file with any particular plotting style. The plotting style is something you choose whenever you want to draw the histogram, not write it.
When i try these commands to normalize histogram error occured
root [1] Double_t norm = h1->GetEntries();
root [2] h->Scale(1/norm);
ROOT_prompt_2:1:12: error: reference to ānormā is ambiguous
h->Scale(1/norm);
^
ROOT_prompt_1:1:10: note: candidate found by name lookup is ānormā
Double_t norm = h1->GetEntries();
^
/usr/include/c++/9/complex:1860:5: note: candidate found by name lookup is āstd::normā
norm(_Tp __x)
^
/usr/include/c++/9/complex:686:5: note: candidate found by name lookup is āstd::normā
norm(const complex<_Tp>& __z)
hello dear yus, i wann merge an error free histogram for this when i typed
h1->Draw(āhistā, āSAMEā);
error is
ROOT_prompt_10:1:17: error: too many arguments to function call, expected at most single argument āoptionā,
have 2 arguments
h1->Draw(āhistā,āSAMEā);
I already try with it but the error is
root [1] Double_t norm = h1->GetEntries();
root [2] h->Scale(1/norm);
ROOT_prompt_2:1:12: error: reference to ānormā is ambiguous
h->Scale(1/norm);
^
ROOT_prompt_1:1:10: note: candidate found by name lookup is ānormā
Double_t norm = h1->GetEntries();
^
/usr/include/c++/9/complex:1860:5: note: candidate found by name lookup is āstd::normā
norm(_Tp __x)
^
/usr/include/c++/9/complex:686:5: note: candidate found by name lookup is āstd::normā
norm(const complex<_Tp>& __z)
root [2] h1->Draw(āhistā);
root [3] Double_t norm = h1->GetEntries();
root [4] h1->Scale(1/norm);
ROOT_prompt_4:1:13: error: reference to ānormā is ambiguous
h1->Scale(1/norm);
^
ROOT_prompt_3:1:10: note: candidate found by name lookup is ānormā
Double_t norm = h1->GetEntries();
^
/usr/include/c++/9/complex:1860:5: note: candidate found by name lookup is āstd::normā
norm(_Tp __x)
^
/usr/include/c++/9/complex:686:5: note: candidate found by name lookup is āstd::normā
norm(const complex<_Tp>& __z)