24#include "ROOT/RFrameTitle.hxx"
37 const int nbins = 200;
43 auto pHist = std::make_shared<RH3D>(xaxis, yaxis, zaxis);
45 for(
int i=0;i<nbins;++i)
46 for(
int j=0;j<nbins;++j)
47 for(
int k=0;k<nbins;++k)
48 pHist->Fill({1.*i,1.*j,1.*k}, i+j+k);
51 auto canvas = RCanvas::Create(
"Large 200x200x200 RH3 drawing");
53 auto frame = canvas->AddFrame();
58 frame->x.zoomMin = nbins*0.1;
59 frame->x.zoomMax = nbins*0.9;
60 frame->y.zoomMin = nbins*0.1;
61 frame->y.zoomMax = nbins*0.9;
62 frame->z.zoomMin = nbins*0.1;
63 frame->z.zoomMax = nbins*0.9;
65 canvas->Draw<RFrameTitle>(
TString::Format(
"Large RH3D histogram with %d x %d x %d bins",nbins,nbins,nbins).
Data());
67 auto draw = canvas->Draw(pHist);
69 draw->line.color = RColor::kLime;
75 draw->optimize =
true;
81 canvas->SetSize(1000, 700);
#define R__LOAD_LIBRARY(LIBRARY)
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.