i need to plot a line in 3D scatter plot

33 次查看(过去 30 天)
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

采纳的回答

Star Strider
Star Strider 2018-9-28
Use the hold (link) function to plot both to the same axes.
figure
scatter3( ... )
hold on
plot3( ... )
hold off
grid on
  4 个评论
Cristián Vera
Cristián Vera 2020-3-21
How can I plot with scatter(X,Y,pointsize,Z,'filled') using '-o' plot lines? Only uses circles.
Star Strider
Star Strider 2020-3-21
@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!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by