-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmake_gif_manifold.m
More file actions
38 lines (27 loc) · 882 Bytes
/
make_gif_manifold.m
File metadata and controls
38 lines (27 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%% manifold tasks
figure(1)
filename = 'manifold10f.gif';
for t = 1:379
tt = t+9;
gscatter(SCORE5(1:tt*5,1),SCORE5(1:tt*5,2),reg(1:tt*5,1),[.37 .31 .64; .21 .47 .73; .25 .64 .70; .44 .78 .65; .63 .85 .64; .83 .93 .61; .92 .96 .62; .96 .46 .27],'.',30)
hold on
plot(SCORE5(1:tt*5-9,1),SCORE5(1:tt*5-9,2),'k','LineWidth',.5)
plot(SCORE5(tt*5-9:tt*5,1),SCORE5(tt*5-9:tt*5,2),'k','LineWidth',5)
hold off
xlim([-10 8])
ylim([-7 7])
set(gcf,'color','w');
hLeg = legend('filename');
set(hLeg,'visible','off');
xlabel('tPC1')
ylabel('tPC2')
drawnow
frame = getframe(1);
im = frame2im(frame);
[imind,cm] = rgb2ind(im,256);
if t == 1;
imwrite(imind,cm,filename,'gif', 'Loopcount',inf);
else
imwrite(imind,cm,filename,'gif','WriteMode','append');
end
end