Setting 3D plot's centre at origin
Mostrar comentarios más antiguos
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
Respuestas (1)
Wan Ji
el 28 de Ag. de 2021
try this
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin','ZAxisLocation', 'origin')
2 comentarios
PASUNURU SAI VINEETH
el 28 de Ag. de 2021
Wan Ji
el 29 de Ag. de 2021
So the only thing to do is
set(gca, 'XAxisLocation', 'origin', 'YAxisLocation', 'origin')
And as for z-axis, can not be set to origin
Categorías
Más información sobre Graphics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!