I am new in Root. Is there any command in ROOT to make the units of x and y axes equal. There is a simple command in Matlab for this purpose:
axis equal
Is there any similar command in ROOT?
In mathlab axis equal means “axis equal: sets the aspect ratio so that the data units are the same in every direction”
In ROOT you would make it by setting the pad/canvas size in such way the unit length on each axis is the same,
Which ROOT object do you plan to use to plot your data ?
I want to draw the results of a planetary simulation by ROOT. As you can see In Matlab figure, when I use “axis equal” option, the output figure is in correct aspect ratio. But I didn’t find any similar command in ROOT. I use TGraphErrors and TMultiGragh objects. OrbitMatlab|604x500
Thanks. But your approach is not general, and in cases where the scales of the axes are not the same, it will leads to the wrong aspect ratio. As an example, an ellipse orbit in Matlab and the same orbit in ROOT: OrbitMatlab|690x356
If a such functionality will be added it surely will not be in the TAxis class. This class deals with individual axis for histograms and does not have the global knowledge of the full plot. I guess we can start writing a general macro doing this and then see in which class it will fit best.