This tutorial illustrates how to create an histogram with hexagonal bins (TH2Poly). The method TH2Poly::Honeycomb allows to build automatically an honeycomb binning.

Author: Olivier Couet
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Thursday, December 01, 2022 at 11:17 AM.

In [1]:
TH2Poly *hc = new TH2Poly();
hc->SetTitle("Honeycomb example");

TRandom ran;
for (int i = 0; i<30000; i++) {
   hc->Fill(ran.Gaus(2.,1), ran.Gaus(2.,1));

Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1

Draw all canvases

In [2]:
%jsroot on