24#include "ROOT/RFrameTitle.hxx"
35 auto pHist1 = std::make_shared<RH1D>(xaxis);
36 auto pHist2 = std::make_shared<RH1D>(xaxis);
38 for (
int n=0;
n<1000;
n++) {
39 pHist1->Fill(
gRandom->Gaus(3,0.8));
40 pHist2->Fill(
gRandom->Gaus(7,1.2));
50 auto subpads = canvas->Divide(2,3);
53 subpads[0][0]->Draw<RFrameTitle>(
"Default RH1 drawing");
54 auto draw001 = subpads[0][0]->Draw(pHist1);
55 draw001->line.color = col1;
56 draw001->line.width = 2;
57 auto draw002 = subpads[0][0]->Draw(pHist2);
58 draw002->line.color = col2;
59 draw002->line.width = 4;
62 subpads[1][0]->Draw<RFrameTitle>(
"Error() draw options");
63 subpads[1][0]->Draw(pHist1)->Error(1).line.color = col1;
67 subpads[0][1]->Draw<RFrameTitle>(
"Text() and Marker() draw options");
68 subpads[0][1]->Draw(pHist1)->Text().text.color = col1;
72 subpads[1][1]->Draw<RFrameTitle>(
"Bar() draw options");
77 subpads[0][2]->Draw<RFrameTitle>(
"Line() draw option");
78 subpads[0][2]->Draw(pHist1)->Line().line.color = col1;
79 subpads[0][2]->Draw(pHist2)->Line().line.color = col2;
82 subpads[1][2]->Draw<RFrameTitle>(
"Lego() draw option");
85 canvas->SetSize(1000, 700);
R__EXTERN TRandom * gRandom
Drawing fill attributes for different objects.
Objects used to configure the different axis types.
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
static R__DLLEXPORT constexpr RGB_t kRed
static R__DLLEXPORT constexpr RGB_t kBlue