Borrar filtros
Borrar filtros

Superposing multiple 3d plots

9 visualizaciones (últimos 30 días)
Anshuman Pal
Anshuman Pal el 22 de Ag. de 2021
Comentada: Anshuman Pal el 23 de Ag. de 2021
Hello,
To superpose 2d plots, I just use the command `hold on` before plotting. However, when I try using this with 3d plots `plot3()`, I get a 2d projection of the superposed plots, instead of getting a 3d plot. What is going on?
Example syntax:
figure
plot3(x,y,z,'k.-')
gives me a 3d plot as expected. However, adding a point at the origin:
figure; hold on
plot3(rx,ry,rz,'k.-')
plot3(0,0,0,'ro')
gives a flat 2d image. Am I typing something wrong? Thank you.

Respuesta aceptada

DGM
DGM el 22 de Ag. de 2021
You should be able to get the 3D view back by just specifying it explicitly after the plotting is done.
view(3)
  1 comentario
Anshuman Pal
Anshuman Pal el 23 de Ag. de 2021
Yes it worked. But I don't understand what happened. What does `view(3)` do?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by