Plot Proportional Honeycomb cell

hello, I am very confused and don’t know how to plot proportional Honeycomb in root.
plot
“Draw(“box”)” command can be simply achieved but I wanna changed the shape.
Your help will be much appreciated.

{
   auto chc = new TCanvas("chc","chc",600,400);
 
   auto hc = new TH2Poly();
   hc->Honeycomb(0,0,.1,25,25);
   hc->SetName("hc");
   hc->SetTitle("Option COLZ 0");
   TRandom ran;
   for (int i = 0; i<300; i++) hc->Fill(ran.Gaus(2.,1), ran.Gaus(2.,1));
   hc->Draw("colz 0");
}

Thanks for your reply, I try the code you provided several days ago, however, the cell size of Honeycomb is fixed (color represented the counts ), did you know how to use the area represented the counts (Z axis)? Thanks again.

The area of the cell proportional to the bin content is done with the option BOX.
There is no other (direct) way.

So are there another ways achieving the Honeycomb cell which is proportional to the bin content ?

No… not really unless you make the code yourself.

Did you know the root code where achieved the area of the cell proportional to the bin content is done with the option BOX. I try to find the code in root but I failed.

Thanks for your prompt reply, I try this method. :+1: :+1: :+1:

If you manage to implement it as a new BOX option you can make a PR and we include it in ROOT.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.