28 R__LOAD_LIBRARY(libROOTHistDraw)
30 using namespace ROOT::Experimental;
35 RAxisConfig xaxis(25, 0., 10.);
36 auto pHist = std::make_shared<RH1D>(xaxis);
37 auto pHist2 = std::make_shared<RH1D>(xaxis);
39 for (
int n=0;n<1000;n++) {
40 pHist->Fill(gRandom->Gaus(3,0.8));
41 pHist2->Fill(gRandom->Gaus(7,1.2));
45 auto canvas = RCanvas::Create(
"Canvas Title");
46 auto draw1 = canvas->Draw(pHist);
47 draw1->AttrLine().SetColor(RColor::kRed).SetWidth(2);
49 auto draw2 = canvas->Draw(pHist2);
50 draw2->AttrLine().SetColor(RColor::kBlue).SetWidth(4);