24#include "ROOT/RFrameTitle.hxx"
33 const int nbins = 2000;
38 auto pHist = std::make_shared<RH2D>(xaxis, yaxis);
40 for(
int i=0;i<nbins;++i)
41 for(
int j=0;j<nbins;++j)
42 pHist->Fill({1.*i,1.*j}, i+j);
45 auto canvas = RCanvas::Create(
"Large 2000x2000 RH2 drawing");
47 auto frame = canvas->AddFrame();
54 frame->x.zoomMin = nbins*0.2;
55 frame->x.zoomMax = nbins*0.8;
56 frame->y.zoomMin = nbins*0.2;
57 frame->y.zoomMax = nbins*0.8;
59 canvas->Draw<RFrameTitle>(
TString::Format(
"Large RH2D histogram with %d x %d bins",nbins,nbins).
Data());
61 auto draw = canvas->Draw(pHist);
63 draw->line.color = RColor::kLime;
74 draw->optimize =
true;
78 stat->fill.style = RAttrFill::kSolid;
80 canvas->SetSize(1000, 700);
RAttrValue< RColor > color
! fill color
Objects used to configure the different axis types.
RAttrFill fill
! fill attributes
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.