#include "ROOT/RFrameTitle.hxx"
auto style = std::make_shared<RStyle>();
void draw_frame()
{
auto pHist = std::make_shared<RH2D>(xaxis, yaxis);
pHist->Fill({0.11, 1.02});
pHist->Fill({5.54, 3.02});
pHist->Fill({20.98, 1.02});
pHist->Fill({20.90, 1.02});
pHist->Fill({1.75, -0.02});
auto canvas = RCanvas::Create("Canvas Title");
auto subpads = canvas->Divide(2,1);
auto frame1 = subpads[0][0]->GetOrCreateFrame();
frame1->AttrBorder().SetWidth(3);
frame1->Margins().SetTop(0.3_normal);
frame1->Margins().SetBottom(0.1_normal);
frame1->Margins().SetLeft(0.2_normal);
frame1->Margins().SetRight(0.2_normal);
frame1->AttrX().SetLog(true);
frame1->AttrX().SetZoom(2.,80.);
frame1->AttrY().SetZoom(2,8);
subpads[0][0]->Draw<RFrameTitle>("Frame1 title")->SetMargin(0.01_normal).SetHeight(0.05_normal);
auto draw1 = subpads[0][0]->Draw(pHist);
auto frame2 = subpads[1][0]->GetOrCreateFrame();
auto draw2 = subpads[1][0]->Draw(pHist);
subpads[1][0]->Draw<RFrameTitle>("Frame2 title");
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; }");
subpads[1][0]->UseStyle(
style);
}
#define R__LOAD_LIBRARY(LIBRARY)
Objects used to configure the different axis types.