25 R__LOAD_LIBRARY(libROOTHistDraw)
29 using namespace ROOT::Experimental;
32 RAxisConfig xaxis(
"x", 10, 0., 1.);
33 RAxisConfig yaxis(
"y", {0., 1., 2., 3., 10.});
34 auto pHist = std::make_shared<RH2D>(xaxis, yaxis);
37 pHist->Fill({0.01, 1.02});
38 pHist->Fill({0.54, 3.02});
39 pHist->Fill({0.98, 1.02});
40 pHist->Fill({1.90, 1.02});
41 pHist->Fill({0.75, -0.02});
44 auto canvas = RCanvas::Create(
"Canvas Title");
45 auto draw1 = canvas->Draw(pHist);
46 draw1->AttrLine().SetColor(RColor::kRed);
48 auto other = std::make_shared<RH2D>(*pHist);
49 auto draw2 = canvas->Draw(other);
50 draw2->AttrLine().SetColor(RColor::kBlue).SetWidth(12);