%summary_plots.m
%
%
infile=input('Enter path and name of input summary file to plot :  ','s');
eval(['load ',infile]);
disp([sprintf('\n'),'loading : ',infile,sprintf('\n')]);

jj=find(~isnan(cpmax) & ~isnan(cpmin));
summ=sum(cpmax(jj)-cpmin(jj))

summ2=sum(epmax-epmin)


figure
subplot(4,1,1)
plot(files,cpmin,'r',files,cpmin,'r*');
hold on
grid on
zoom on
plot(files,epmin,'b',files,epmin,'b*');
plot(files,cpmax,'r',files,cpmax,'r*');
plot(files,epmax,'b',files,epmax,'b*');
ylabel('Min/Max (r=cpres  b=epres)');
x=find(infile=='_');
if any(x)
   title([infile(1:x-1),'\',infile(x:end)]);
else
   title(infile)
end
axis ij
clear x

%figure(2)
subplot(4,1,2)
plot(files(1:2:end),avecur(1:2:end),'r');
hold on
grid on
zoom on
plot(files(2:2:end),avecur(2:2:end),'b');
ylabel('ave curr  r=dn  b=up  ');


%figure(3)
subplot(4,1,3)
plot(files(1:2:end),abs(espeed(1:2:end)),'r');
hold on
grid on
zoom on
plot(files(2:2:end),abs(espeed(2:2:end)),'b');
ylabel('abs(espeed)  r=dn  b=up');


%figure(4)
subplot(4,1,4)
plot(files,aveV1,'r',files,aveV1,'r*');
hold on
grid on
zoom on
plot(files,aveV2,'b',files,aveV2,'b*');
ylabel('aveV1 (r)    aveV2 (b)');
xlabel('Station Number');
