필터 지우기
필터 지우기

How do I color a comet plot.

조회 수: 9 (최근 30일)
Nathen Eberhardt
Nathen Eberhardt 2020년 4월 10일
답변: KSSV 2020년 4월 10일
Basically I want to make my comet line in my plot to be black, with a thick line or perferebly ball.
This is what i have:
dt = 2.5;
ddt = 0:dt:10;
%Plot animation
for index = 1:length(ddt)
comet(H,t)
xlim([-2,2])
ylim([min(H),max(H)])
pause(dt)
end
This puts out a orange coment thats a line, any way I can make it black and and ball?
If not a ball then what i really want it to be black.

답변 (1개)

KSSV
KSSV 2020년 4월 10일
You can make your required plot using a loop.
x = linspace(0,2*pi,1000) ;
y = sin(x) ;
for i = 1:length(x)
plot(x(1:i),y(1:i),'r')
drawnow
end

카테고리

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