I would like to draw a T2DGraph with the same scale at each axis. In order to do that, I have calculated the maximum of the differences between the maximum and the minimum of each axis. Then, I have calculated the mean point of each axis and I have added +/- the half of the previous distance.
This is shown at the code below:
distance = max(max((f2DPlot->GetXmax()-f2DPlot->GetXmin()),
(f2DPlot->GetZmax()-f2DPlot->GetZmin())) / 2;
medX = (f2DPlot->GetXmax() + f2DPlot->GetXmin()) / 2;
medY = (f2DPlot->GetYmax() + f2DPlot->GetYmin()) / 2;
medZ = (f2DPlot->GetZmax() + f2DPlot->GetZmin()) / 2;
If I print out the value of limits, they are ok. However, when I call the method Draw(), the limits of the z axis are not the ones they are printed.
What had happened?
I thank your help in advance.
University of Zaragoza