Hello,
Let’s consider:
TH1F *h = new TH1F(“h”,“hist”,100,-3,3);
h->FillRandom(“gaus”,1000);
h->Fit(“gaus”,“Q0”);
h->SetMarkerStyle(20);
Then:
h->Draw();
h->Draw(“P”);
h->DrawNormalized();
are OK, but
h->DrawNormalized(“P”);
scale Y axis according to maximum of gaus fit.
How can I draw normalized histogram with “P” (or any other graphic option) scaled according to normalized histogram content? Is it possible to draw normalized fit function also?
Thanks and regards,
Vladimir.
I guess you need to scale your histogram first and then fit it (don’t use the “0” fit option if you want to have the function drawn).
1 Like