i need to plot a line in 3D scatter plot

i have created a scatter plot with scatter3. now without clearing this plot I need to draw a line in the same graph. when I put plot3 after scatter3 it clears the plot and then gives me the plot3 graph without the scatter points
david

 Respuesta aceptada

Star Strider
Star Strider el 28 de Sept. de 2018
Use the hold (link) function to plot both to the same axes.
figure
scatter3( ... )
hold on
plot3( ... )
hold off
grid on

4 comentarios

david edwards jr
david edwards jr el 28 de Sept. de 2018
perfect. thanks! david
Star Strider
Star Strider el 28 de Sept. de 2018
As always, my pleasure!
Cristián Vera
Cristián Vera el 21 de Mzo. de 2020
How can I plot with scatter(X,Y,pointsize,Z,'filled') using '-o' plot lines? Only uses circles.
Star Strider
Star Strider el 21 de Mzo. de 2020
@Cristián Vera — Use plot rather than scattter to plot lines (with or without markers). What you want to do is not obvious, so perhaps using both (with the hold function) will do what you want. Experiment!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 28 de Sept. de 2018

Comentada:

el 21 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by