21#include "ROOT/RFrameTitle.hxx"
33auto style = std::make_shared<RStyle>();
40 auto pHist = std::make_shared<RH2D>(xaxis, yaxis);
43 pHist->Fill({0.11, 1.02});
44 pHist->Fill({5.54, 3.02});
45 pHist->Fill({20.98, 1.02});
46 pHist->Fill({20.90, 1.02});
47 pHist->Fill({1.75, -0.02});
50 auto canvas = RCanvas::Create(
"Canvas Title");
53 auto subpads = canvas->Divide(2,1);
56 auto frame1 = subpads[0][0]->GetOrCreateFrame();
59 frame1->AttrBorder().SetWidth(3);
60 frame1->Margins().SetTop(0.3_normal);
61 frame1->Margins().SetBottom(0.1_normal);
62 frame1->Margins().SetLeft(0.2_normal);
63 frame1->Margins().SetRight(0.2_normal);
68 frame1->AttrX().SetLog(
true);
69 frame1->AttrX().SetZoomMinMax(2.,80.);
70 frame1->AttrY().SetMinMax(2,8);
72 subpads[0][0]->Draw<RFrameTitle>(
"Frame1 title")->SetMargin(0.01_normal).SetHeight(0.05_normal);
74 auto draw1 = subpads[0][0]->Draw(pHist);
77 auto frame2 = subpads[1][0]->GetOrCreateFrame();
79 auto draw2 = subpads[1][0]->Draw(pHist);
81 subpads[1][0]->Draw<RFrameTitle>(
"Frame2 title");
83 style->ParseString(
"frame { margin_left: 0.3; margin_right: 0.3; x_line_color_name: blue; y_line_color_name: green; } \n title { margin: 0.02; height: 0.1; text_size: 20; }");
85 subpads[1][0]->UseStyle(
style);
#define R__LOAD_LIBRARY(LIBRARY)
Objects used to configure the different axis types.