{ "cells": [ { "cell_type": "markdown", "id": "746c5094", "metadata": {}, "source": [ "# hist038_TH2Poly_honeycomb\n", "bins (TH2Poly). The method TH2Poly::Honeycomb allows to build automatically\n", "an honeycomb binning.\n", "\n", "\n", "\n", "\n", "**Author:** Olivier Couet \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:12 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "ad77a22c", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:12:52.721216Z", "iopub.status.busy": "2026-05-19T20:12:52.721102Z", "iopub.status.idle": "2026-05-19T20:12:53.075794Z", "shell.execute_reply": "2026-05-19T20:12:53.075130Z" } }, "outputs": [], "source": [ "TCanvas *C = new TCanvas(\"C\", \"C\", 1200, 600);\n", "C->Divide(2, 1);\n", "\n", "TH2Poly *hc1 = new TH2Poly();\n", "hc1->Honeycomb(0, 0, .1, 5, 5);\n", "hc1->SetTitle(\"Option V (default)\");\n", "hc1->SetStats(0);\n", "hc1->Fill(.1, .1, 15.);\n", "hc1->Fill(.4, .4, 10.);\n", "hc1->Fill(.5, .5, 20.);\n", "\n", "TH2Poly *hc2 = new TH2Poly();\n", "hc2->Honeycomb(0, 0, .1, 5, 5, \"h\");\n", "hc2->SetTitle(\"Option H\");\n", "hc2->SetStats(0);\n", "hc2->Fill(.1, .1, 15.);\n", "hc2->Fill(.4, .4, 10.);\n", "hc2->Fill(.5, .5, 20.);\n", "\n", "C->cd(1)->SetGrid();\n", "hc1->Draw(\"colz L\");\n", "C->cd(2)->SetGrid();\n", "hc2->Draw(\"colz L\");" ] }, { "cell_type": "markdown", "id": "85ee5c76", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "ef4221d7", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:12:53.077136Z", "iopub.status.busy": "2026-05-19T20:12:53.077019Z", "iopub.status.idle": "2026-05-19T20:12:53.297975Z", "shell.execute_reply": "2026-05-19T20:12:53.297434Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%jsroot on\n", "gROOT->GetListOfCanvases()->Draw()" ] } ], "metadata": { "kernelspec": { "display_name": "ROOT C++", "language": "c++", "name": "root" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".C", "mimetype": " text/x-c++src", "name": "c++" } }, "nbformat": 4, "nbformat_minor": 5 }