19void hist013_TH1_rebin()
22 TH1F *
h =
new TH1F(
"h",
"test rebin", 100, -3, 3);
27 TAxis *axis =
h->GetXaxis();
28 for (
Int_t i = 1; i <= 100; i++) {
34 for (
Int_t j = 0; j <
y; j++) {
42 TH1F *hnew =
new TH1F(
"hnew",
"rebinned", k, xbins);
48 for (
Int_t j = 0; j < k; j += 2) {
49 xbins2[kk] =
xbins[j];
52 xbins2[kk] =
xbins[k];
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
Class to manage histogram axis.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
1-D histogram with a float per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr)
Rebin this histogram.
const double xbins[xbins_n]