18 auto h1 =
new TH1I(
"hist",
"Random data", 100, -5, 5);
21 auto c1 =
new TCanvas(
"c1",
"Logarithmic scales", 1200, 800);
23 if (!
gROOT->IsBatch() && !
c1->IsWeb())
24 ::Warning(
"logN.cxx",
"macro will not work without enabling web-based canvas");
28 c1->GetPad(1)->SetLogy(2);
29 c1->GetPad(1)->Add(
h1,
"");
31 c1->GetPad(2)->SetLogy(3);
32 c1->GetPad(2)->Add(
h1,
"l");
34 c1->GetPad(3)->SetLogy(8);
35 c1->GetPad(3)->Add(
h1,
"c");
37 c1->GetPad(4)->SetLogy(25);
38 c1->GetPad(4)->Add(
h1,
"E");
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
1-D histogram with an int per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)