Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:wantto8

ヒストグラムのbinの中のentry数を表示させたい


TH1::Draw の“TEXT” optionを使う。

ただし、“TEXT” だけだとhistogram自身が描画されず、数字だけ、しかも横向きに表示されてしまう。 そのため、

  TH1F *hist = new TH1F("hist","hist",100,0,100);
  //....(hist->Fill(...))
  hist->SetMarkerSize(2.5);
  hist->Draw("HIST TEXT0");