%% Displaying Real Objects
% If you want to display an object so that it looks realistic, you need to change MATLAB defaults. For example, this data defines a wedge-shaped patch object.

vert = [0 0 0; 0 1 0; 1 1 0; 1 0 0; 0 0 1; 0 1 1; 1 1 4; 1 0 4];
fac = [1 2 3 4; 2 6 7 3; 4 3 7 8; 1 5 8 4; 1 2 6 5; 5 6 7 8];
patch('Vertices',vert,'Faces',fac,...
   'FaceColor',[0.7 0.7 0.7],'EdgeColor','k')
view(3)

%
% However, this axes distorts the actual shape of the solid object defined by the data. To display it in correct proportions, set the DataAspectRatio. Setting this property makes the units equal in the x-, y-, and z-directions and prevents the axes from being stretched to fill the position rectangle, revealing the true shape of the object.

set(gca,'DataAspectRatio',[1 1 1])

% Copyright 2019 The MathWorks, Inc.