The first argument of SetBinLabel is the bin number, not the value on the axis. So it seems that “5 to 6” is bin number 6 in your case, and so on, but you should know the binning of your histogram.
Thanks a lot for the reply! Even though “5 to 6” is bin number 5 or 6, my question is how should I label the bin edges. For instance, here, bin 6 is re-labeled as 90 (as written in the commands used in the question), but what I want is text “90” should be on the edge of the bin and not in the center of the bin.
i.e. text “5” should be replaced by say “x” and text “6” to be replaced by say “y”; and not “5 and 6” getting replaced by centered text “90” as seen in the second plot of the question.