Hi,
I would like to know how to draw a TH1 on the center of a TH2Poly bin.
The TH2Poly is created as follows:
auto c = new TCanvas("c","",800,1000);
TH2Poly *hc = new TH2Poly();
hc->SetTitle(";x [mm];y [mm]");
hc->Honeycomb(0,0,TMath::Sqrt2(),4,3,"h");
hc->SetStats(0);
hc->Draw("L");
gPad->Modified(); gPad->Update();
gPad->GetFrame()->SetLineColor(0);
c->SetRealAspectRatio(1);
Thanks a lot!
Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q
will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug
from the ROOT prompt to pre-populate a topic.
ROOT Version: 6.31/01
Platform: Linux
Compiler: GCC 9.3.0