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일

1 개 추천

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

댓글 수: 4

perfect. thanks! david
Star Strider
Star Strider 2018년 9월 28일
As always, my pleasure!
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개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

질문:

2018년 9월 28일

댓글:

2020년 3월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by