/[MITgcm]/MITgcm_contrib/gmaze_pv/visu/videotimeline.m
ViewVC logotype

Contents of /MITgcm_contrib/gmaze_pv/visu/videotimeline.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Oct 6 18:56:55 2006 UTC (18 years, 9 months ago) by gmaze
Branch: MAIN
CVS Tags: HEAD
update visu

1 %
2 % [] = videotimeline(TIMERANGE,IT,POSITION)
3 %
4 % TIMERANGE contains all the time line serie
5 % TIME contains the current time
6 %
7
8 function varargout = videotimeline(TIME,it,POSIT)
9
10
11 [nt nc] = size(TIME);
12
13 DY = .02;
14 DX = 1/nt;
15
16 bgcolor=['w' 'r'];
17 bdcolor=['k' 'r'];
18 txtcolor=['k' 'w'];
19 fts = 8;
20
21 figure(gcf);hold on
22
23 for ii = 1 : nt
24 %p=patch([ii-1 ii ii ii-1]*DX,[1 1 0 0]*DY,'w');
25 if POSIT == 't'
26 s=subplot('position',[(ii-1)*DX 1-DY DX DY]);
27 else
28 s=subplot('position',[(ii-1)*DX 0 DX DY]);
29 end
30 p=patch([0 1 1 0],[0 0 1 1],'w');
31 set(s,'ytick',[],'xtick',[]);
32 set(s,'box','on');
33 tt=text(.35,0.5,TIME(ii,:));
34
35 if ii == it
36 set(p,'facecolor',bgcolor(2));
37 set(p,'edgecolor',bdcolor(2));
38 %set(s,'color',bgcolor(2));
39 set(tt,'fontsize',fts,'color',txtcolor(2));
40 else
41 set(p,'facecolor',bgcolor(1));
42 set(p,'edgecolor',bdcolor(1));
43 %set(s,'color',bgcolor(1));
44 set(tt,'fontsize',fts,'color',txtcolor(1));
45 end
46 end

  ViewVC Help
Powered by ViewVC 1.1.22