MATLAB: I need to plot a line in 3D scatter plot

plot3scatter3

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

Best Answer

Use the hold (link) function to plot both to the same axes.
figure
scatter3( ... )
hold on
plot3( ... )
hold off
grid on