Hey there,
I am attempting to plot multiple pieces of data into one plot, I have changed around the position of the 'hold on' and 'hold off' many times (before the for loop, in the middle...etc). And it still produces 2 seperate plots (tempV2 = 2). Not sure what is the issue, using vectors and proper syntax.
Thank you,

 채택된 답변

VBBV
VBBV 2021년 4월 8일

1 개 추천

%if true
fig4 = figure()
Comment the above line in the loop. It produces a seperate figure window each time in loop

댓글 수: 5

nathan stallworth
nathan stallworth 2021년 4월 8일
Hey there,
So if i take put the fig4 = figure() line before the for loop it only produces one plot but still not plotting the data I want. If i put the hold on before and after the for loop it plots the data I want but a 2D plot, no longer a 3D plot.
VBBV
VBBV 2021년 4월 8일
Try with plot3 function
nathan stallworth
nathan stallworth 2021년 4월 8일
Still only produces one set of data.
%if true
for i = 1:tempv2
x(i) = your code
y(i) = your code
z(i) = your code
scatter3(x(1:i),y(1:i),z(1:i),'filled')
...%rest of code
....
end
Try the above changes mentioned
nathan stallworth
nathan stallworth 2021년 8월 13일
편집: nathan stallworth 2021년 8월 13일
Thank you, I appreciate it!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

질문:

2021년 4월 8일

편집:

2021년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by