ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
th2polyHoneycomb.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_hist
3
/// \notebook -js
4
/// This tutorial illustrates how to create an histogram with hexagonal
5
/// bins (TH2Poly). The method TH2Poly::Honeycomb allows to build automatically
6
/// an honeycomb binning.
7
///
8
/// \macro_code
9
/// \macro_image
10
///
11
/// \author Olivier Couet
12
13
void
th2polyHoneycomb(){
14
TH2Poly *hc =
new
TH2Poly();
15
hc->SetTitle(
"Honeycomb example"
);
16
hc->Honeycomb(0,0,.1,25,25);
17
18
TRandom ran;
19
for
(
int
i = 0; i<30000; i++) {
20
hc->Fill(ran.Gaus(2.,1), ran.Gaus(2.,1));
21
}
22
23
hc->Draw(
"colz"
);
24
}
tutorials
hist
th2polyHoneycomb.C
Generated on Tue May 5 2020 14:03:46 for ROOT by
1.8.5