Can some x-axis value be replaced by some character in TGraphError?


I am trying to replace some portion of x-axis float value by some text character in TGraphError. But not getting any clue how to do it. Can anyone help me?

Thanks & Regards,

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Thanks @dastudillo it is working now!

So here using ChangeLabel() member function we can replace only label value by some text. But if I am willing to add some text at some bin center, where there is no label, means in between two label, then how to do that?

Like, say my axis label is 0, 10, 20, 30, 40, 50. And by bin center is 5, 15, 25, 35, 45. So if I now use ChangeLabel() function then I can replace [0, 10, 20, 30, 40, 50] any of these values by text. But if I want to replace [5, 15, 25, 35, 45] these values by some text (because my data points lie here) then how to do that?

Thanks & Regards,

Try SetBinLabel:

Or just draw the text as TLatex at any position you want.

You can also increase the number of divisions:


Then the intermediate labels (ending with 5) will appear (increase the number of division until the do). Then you will be able to use the ChangeLabel technique.