24#include "ROOT/RFrameTitle.hxx"
39 auto pHist1 = std::make_shared<RH1D>(xaxis);
40 auto pHist2 = std::make_shared<RH1D>(xaxis);
42 for (
int n=0;
n<1000;
n++) {
48 auto canvas = RCanvas::Create(
"RH1 drawing options");
51 auto col1 = RColor::kRed, col2 = RColor::kBlue;
54 auto subpads = canvas->Divide(2,3);
57 subpads[0][0]->Draw<RFrameTitle>(
"Default RH1 drawing");
58 auto draw001 = subpads[0][0]->Draw(pHist1);
59 draw001->line.color = col1;
60 draw001->line.width = 2;
61 auto draw002 = subpads[0][0]->Draw(pHist2);
62 draw002->line.color = col2;
63 draw002->line.width = 4;
66 subpads[1][0]->Draw<RFrameTitle>(
"Error() draw options");
67 subpads[1][0]->Draw(pHist1)->Error(1).line.color = col1;
68 subpads[1][0]->Draw(pHist2)->Error(4).fill =
RAttrFill(col2, RAttrFill::k3003);
71 subpads[0][1]->Draw<RFrameTitle>(
"Text() and Marker() draw options");
72 subpads[0][1]->Draw(pHist1)->Text().text.color = col1;
73 subpads[0][1]->Draw(pHist2)->Marker().marker =
RAttrMarker(col2, 0.02, RAttrMarker::kOpenStar);
76 subpads[1][1]->Draw<RFrameTitle>(
"Bar() draw options");
77 subpads[1][1]->Draw(pHist1)->Bar(0,0.5).fill =
RAttrFill(col1, RAttrFill::kSolid);
78 subpads[1][1]->Draw(pHist2)->Bar(0.5,0.5,
true).fill =
RAttrFill(col2, RAttrFill::kSolid);
81 subpads[0][2]->Draw<RFrameTitle>(
"Line() draw option");
82 subpads[0][2]->Draw(pHist1)->Line().line.color = col1;
83 subpads[0][2]->Draw(pHist2)->Line().line.color = col2;
86 subpads[1][2]->Draw<RFrameTitle>(
"Lego() draw option");
87 subpads[1][2]->Draw(pHist1)->Lego().fill =
RAttrFill(col1, RAttrFill::kSolid);
89 canvas->SetSize(1000, 700);
#define R__LOAD_LIBRARY(LIBRARY)
R__EXTERN TRandom * gRandom
Drawing fill attributes for different objects.
Objects used to configure the different axis types.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...