Custom x-axis points/widths on TH1?

Hi all,

I am wondering if someone knows of a way to customise the distance between integer points on the x-axis of a histogram in a non-linear way (I realise this likely sounds particularly crazy).

To illustrate, if I have an x-axis which on a linear scale looks like:

1|---2|---3|---4|---5| ... etc

at set distance between integers, and I wanted to change this to display with some bins having not the set width between them (but still the same numbers ‘attached’):

1|--------2|-----3|---4|---5| ... etc

then the question is whether it is possible to get hold of the TAxis and modify in this way? (Note I am not looking for a logx axis here, nothing that trivial I am afraid).

Many thanks for any assistance,
Darren

PS: Sorry if this is already documented; I did try to search around but it was difficult to describe, and thus search, for what I want to do! :slight_smile:

Did you try TGaxis? If I understand your post correctly, you can get what you want by modifying TGaxis+TF1 examples in the users guide.