Histogram Bin Labels

I would like to change/set the label of a particular histogram bin (say, the first one).
I know about
However, once I perform this function call, all other bin labels disappear. I assume this has to do with the fact that the histogram switches to “alphanumeric mode” (whatever that means in detail).
What I would like to do is the following:
Change a single bin label to some expression (say, “#infty”), but leave alone the rest of the bin labels, that is, having them drawn as-usual without interfering with them in any way.

Is this possible? If so, what do I need to do?


PS: I have also thought about simply adding a TLatex to the canvas - the problem here being that I would then need to propagate this TLatex object through the whole production chain until the very end, when the histogram is drawn - plus, I would need to calculate the coordinates correctly, which I don’t know how to do. I was hoping for a possiblity to save the bin label information within the histogram object in a way that all Style changes are automatically and consistently applied to all bin labels (including my selfmade one).

You cannot mix alphanumeric and numeric labels. A soon as you set one label your histogram turns into an alphanumeric one and then you have to define all the labels the same way.

Ok, thanks for letting me know. However, this is of course a bit of a letdown.
Can you point me towards the location in the root source code where the bin/tick labels are automatically computed (when not set)? I could maybe copy that function and thus set all the other labels manually.

Since all this just boils down to the fact that I want to mark the underflow bin to be “special” (and make this fact easily recognizable when looking at the plot), I could alternatively do this by painting it on the other side of the axis. Is there an easy way to shift the axis to a different position of the plot? (I know about the X+/- Y+/- Draw options, but I would like to have the axis mid plot, on the right side of the first bin).


root.cern.ch/root/html534/TGaxis … :PaintAxis

In that case just add a TLatex or a TText at the right place.