24#include "ROOT/RFrameTitle.hxx"
33 const int nbins = 200;
39 auto pHist = std::make_shared<RH3D>(xaxis, yaxis, zaxis);
41 for(
int i=0;i<nbins;++i)
42 for(
int j=0;j<nbins;++j)
43 for(
int k=0;k<nbins;++k)
44 pHist->Fill({1.*i,1.*j,1.*k}, i+j+k);
47 auto canvas = RCanvas::Create(
"Large 200x200x200 RH3 drawing");
49 auto frame = canvas->AddFrame();
54 frame->x.zoomMin = nbins*0.1;
55 frame->x.zoomMax = nbins*0.9;
56 frame->y.zoomMin = nbins*0.1;
57 frame->y.zoomMax = nbins*0.9;
58 frame->z.zoomMin = nbins*0.1;
59 frame->z.zoomMax = nbins*0.9;
61 canvas->Draw<RFrameTitle>(
TString::Format(
"Large RH3D histogram with %d x %d x %d bins",nbins,nbins,nbins).
Data());
63 auto draw = canvas->Draw(pHist);
65 draw->line.color = RColor::kLime;
71 draw->optimize =
true;
77 canvas->SetSize(1000, 700);
Objects used to configure the different axis types.
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.