23#include "ROOT/RFrameTitle.hxx"
40 auto pHist = std::make_shared<RH2D>(xaxis, yaxis);
42 for (
int n=0;
n<10000;
n++)
43 pHist->Fill({gRandom->Gaus(5.,2.), gRandom->Gaus(5.,2.)});
46 auto canvas = RCanvas::Create(
"Canvas Title");
48 auto frame = canvas->GetOrCreateFrame();
51 frame->Margins().SetRight(0.2_normal);
53 frame->SetGridX(
false).SetGridY(
false);
56 frame->SetTicksX(2).SetTicksY(2);
61 frame->AttrX().SetZoom(2.,8.);
63 frame->AttrY().SetZoom(2.,8.);
65 canvas->Draw<RFrameTitle>(
"2D histogram with color palette")->SetMargin(0.01_normal).SetHeight(0.09_normal);
69 auto draw = canvas->Draw(pHist);
82 canvas->SetSize(1000, 700);
#define R__LOAD_LIBRARY(LIBRARY)
RAttrFill & SetColor(const RColor &color)
The fill color.
Objects used to configure the different axis types.
A color palette draw near the frame.