-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtimedev.m
30 lines (29 loc) · 881 Bytes
/
timedev.m
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
function timedev(fig,ntim,thead,head)
global bval tdev tdim local
sep=find(isnan(tdev))-1; np=length(sep);
np2=floor(sqrt(np));
ax=getaxes(fig,np/np2,np2,'Time development',head); s0=1;
x=0:(ntim-1);
tim=tdim.time(find(isfinite(tdim.time)));
for i=1:np
if x(1)
updateimage(fig,ax(i),fliplr(x),0:(sep(i)-s0),fliplr(tdim.data(s0:sep(i),:)))
datetick(ax(i),'x',15,'keeplimits')
set(ax(i),'xdir','normal')
else
updateimage(fig,ax(i),x,0:(sep(i)-s0),tdim.data(s0:sep(i),:))
set(ax(i),'xdir','reverse','xtickmode','auto','xticklabelmode','auto')
end
s0=sep(i)+2;
if i>length(thead)
set(get(ax(i),'title'),'string',['Line plot ' num2str(i)])
else
set(get(ax(i),'title'),'string',char(thead(i)))
end
end
if ~x(1)
set(get(ax(np),'xlabel'),'string','Number PIs ago')
else
set(get(ax(np),'xlabel'),'string','Time (UT)')
end
set(get(ax(1),'ylabel'),'string','Point #')