2nd Y axis moves away or changes dim when I zoom in the plot

Dear All,
I have created a plot with a second y-axis which I have created like so:

TGaxis *axis = new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),gPad->GetUxmax(),gPad->GetUymax(),0,10,510,"+L");
axis->Draw();

everything is fine but when I zoom in the X axis of the plot the axis I created moves to the right and when I zoom in the 1st Y axis the dimensions of the axis i created get bigger.

Is there a way to fix the 2nd axis’ position and size so that it is not affected by the zoom?
thank you in advance,
thodoros

To help you more efficiently I would need a macro reproducing what you describe here. But what you see is normal you draw the axis a a fixe position, when the limit of the plot changes it move away. Using TExec may help because then the axis will be Painted with the new position. Depends also what you do may be the option X+ is enough … Send a small running macro and I will try to modify it.

Hallo,
thanks a lot for the reply.
the problem is that this is part of a big macro, which is called from an even bigger macro that i didn’t even write and i am not sure that i can send you a working one.
the philosophy is that a plot is created by a macro and then i invoke another macro with the lines i have already posted that draws a plot on top of that.
is there a way to draw an axis in respect to the dimensions of the pad and not of the plot so that whenever i change the graph the axis will not be affected?
thanks,
thodoros

ok. The simplest will be to create a extra pad on side in which you draw the axis.