24#include "ROOT/RFrameTitle.hxx"
39 const int nbins = 5000000;
43 auto pHist = std::make_shared<RH1D>(xaxis);
45 for(
int i=0;i<nbins;++i)
46 pHist->Fill(1.*i, 1000.*(2+
TMath::Sin(100.*i/nbins)));
49 auto canvas = RCanvas::Create(
"Drawing large RH1");
51 auto frame = canvas->AddFrame();
55 frame->x.zoomMin = nbins*0.2;
56 frame->x.zoomMax = nbins*0.8;
58 canvas->Draw<RFrameTitle>(
TString::Format(
"Large RH1D histogram with %d bins",nbins).
Data());
60 auto draw = canvas->Draw(pHist);
62 draw->line.color = RColor::kLime;
70 draw->optimize =
true;
74 stat->fill.style = RAttrFill::kSolid;
76 canvas->SetSize(1000, 700);
#define R__LOAD_LIBRARY(LIBRARY)
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.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.