This macro generates a small V7 TH1D, fills it and draw it in a V7 canvas.
The canvas is display in the web browser and the corresponding png picture is generated.
void draw_rh1() {
RAxisConfig xaxis(10, 0., 10.);
auto pHist = std::make_shared<RH1D>(xaxis);
auto pHist2 = std::make_shared<RH1D>(xaxis);
pHist->Fill(1);
pHist->Fill(2);
pHist->Fill(2);
pHist->Fill(3);
pHist2->Fill(5);
pHist2->Fill(6);
pHist2->Fill(6);
pHist2->Fill(7);
auto canvas = RCanvas::Create("Canvas Title");
auto draw1 = canvas->Draw(pHist);
auto draw2 = canvas->Draw(pHist2);
canvas->Show();
}
- Date
- 2015-03-22
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Axel Naumann axel@.nosp@m.cern.nosp@m..ch
Definition in file draw_rh1.cxx.