Setting 3D plot's centre at origin

조회 수: 64(최근 30일)
PASUNURU SAI VINEETH
PASUNURU SAI VINEETH 2021년 8월 28일
댓글: Wan Ji 2021년 8월 29일
Hey community, when I plot the 3D graph in a certain program, the intersection of X and Y axes wasn't present on the z=0 plane. I would like to know the command that forces the origin (0,0,0) to be the intersection of axes. I am sharing the plot command and the plot output.
plot3(x,y,z)
xlabel('x [m]')
ylabel('y [m]')
zlabel('z [m]')
grid

답변(1개)

Wan Ji
Wan Ji 2021년 8월 28일
try this
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin','ZAxisLocation', 'origin')
  댓글 수: 2
Wan Ji
Wan Ji 2021년 8월 29일
So the only thing to do is
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin')
And as for z-axis, can not be set to origin

댓글을 달려면 로그인하십시오.

범주

Find more on 2-D and 3-D Plots in Help Center and File Exchange

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by