TGraph2D SetPoint problems inside a non-for loop

Forget the 3D polyline for the moment (just comment out the line “l->Draw();”).
The problem is that, as soon as you enforce the same “x” or “y” for all points of the “g2” 2D graph, the “z” axis range of the 3D view will unconditionally be set to -1 … +1.