Copying TGraph range

Hi experts,

I tried to copy the range of one TGraph to another. By trial and error, I found that for X and Y axis, I have to perform different operations:

[code]void copyTGraphRange(TGraph& in, TGraph& out)
//out.GetXaxis()->SetRangeUser(in.GetXaxis()->GetXmin(),in.GetXaxis()->GetXmax()); //no effect

//(out.GetYaxis())=(in.GetYaxis()); //no effect

The complete test code is in the attachment. I tested this in 6.08.02. Could you explain why is there a difference in the treatment of the two axis? Thanks.
axisRange.C (1.19 KB)

Could anyone answer this, please?

May be this can help: