24#include "ROOT/RFrameTitle.hxx"
34 const int nbins = 5000000;
38 auto pHist = std::make_shared<RH1D>(xaxis);
40 for(
int i=0;i<nbins;++i)
41 pHist->Fill(1.*i, 1000.*(2+
TMath::Sin(100.*i/nbins)));
44 auto canvas = RCanvas::Create(
"Drawing large RH1");
46 auto frame = canvas->AddFrame();
50 frame->x.zoomMin = nbins*0.2;
51 frame->x.zoomMax = nbins*0.8;
53 canvas->Draw<RFrameTitle>(
TString::Format(
"Large RH1D histogram with %d bins",nbins).
Data());
55 auto draw = canvas->Draw(pHist);
57 draw->line.color = RColor::kLime;
65 draw->optimize =
true;
69 stat->fill.style = RAttrFill::kSolid;
71 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.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.