Axis scaling

I have 3D data built using the plot3 function. I would like to limit the axes Y and Z so that they are equal in scale. The X axis should automatically scale as usual.

I know from here that I can make the X axis the only one that will automatically scale using the command:

axis 'auto x';

However, this causes the Y and Z axes to be displayed only from 0 to 1; my data often exceeds this on all axes. I am looking for a graph that contains all the data in one view, but with the smallest Y or Z axis, reduced so that the Y and Z axes are equivalent in scale.

Any help would be greatly appreciated.

+5
source share
2 answers

daspect.

plot3(5*rand(10,1),10*rand(10,1),rand(10,1))

tmpAspect=daspect();
daspect(tmpAspect([1 2 2]))

daspect() , 'auto'.

daspect(tmpAspect([1 2 2])) , y z .

+7

axis equal

axis tight
axis equal

.

, ?

help axis Matlab axis.

+4