
                    # Rebin and save new created histogram and axis
                    plot.histo[i] = plot.histo[i].Rebin(mergeNumberBins)

                    # set view range. it is important to note that the number of bins have changed with the rebinning
                    # the total number and the number of shift must be
                    # corrected with / mergeNumberBins
                    plot.histo[i].GetXaxis().SetRange(int(numberOfBins / (2 * mergeNumberBins) - binShift /
                                                          mergeNumberBins), int(numberOfBins / (2 * mergeNumberBins) + binShift / mergeNumberBins))

        # save copy