Animate a scatter plot with time

조회 수: 1 (최근 30일)
Hanna Ngo
Hanna Ngo 2021년 6월 26일
답변: Image Analyst 2021년 6월 27일
I am trying to plot data points into a scatter plot. I want the data plot to go according to time and that it has to be in a loop. Here is what I tried for the code but it only shows the plot and does not show the animated scatter plot. Since these are specific data points, I do not know how to plot it using the for loop. Can anyone please help me?
a = PDMS501100mN0.(2);
b = PDMS501100mN0.(1);
scatter(PDMS501100mN0.(2),PDMS501100mN0.(1),'o')
xlabel('Distance(mm)')
ylabel('Force(mN)')
pause(0.1);

답변 (1개)

Image Analyst
Image Analyst 2021년 6월 27일
You have to have it in a loop. You have no for loop. What do you want to animate? The number of points? The viewpoint? The zoom? In the loop you have to change something otherwise it will look the same every time.

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by