Axis rescaling

Dear list,

I have an histogram (with various superimposed TGraph(s)) with an x-axis that goes from 1e-2 to 8e-2 eV (electronvolt). I would like it to go from 10 to 80 meV, without changing the actual data, but only applying a new Axis. What are the required steps to do so?

Thanks in advance,
marco

And what should append to your TGraphs ? they should be rescaled to fit in that new range ?

Actually the range would be the same. My aim is just to change the labels in the range from 1e-2 to 8e-2 to be 10 to 80 (i.e. multiplying by a factor of 100) without changing anything in the data. I’ve tried defining a new TGaxis:

TGaxis *ax = new TGaxis(1e-2,77,8e-2,77,10,80,10,"+GB"); ax->Draw();

The axis is correctly plot, but the labels (with the new values) are not created.

Any hint?

PS: I’m using v5.20.00

Can you send a small running macro showing where you are now ?

Marco,

This would be totally misleading when doing picking, for instance.
Make an overlay transparent pad with the new scale.

Rene

Thanks. Actually the plot was always working. I was not seeing any label because the SetMoreLogLabel option was not enabled. Actually I’m forced to plot, as Rene suggested, black TPad over the old label, otherwise the superposition of those two create a little mess there…

regards,
marco