function plot_all(varargin)
%%% plot all surveys
close all
k=1;

% 1st survey
[xi,yi,first_altitude] = plot_interpolation(2009,7);

% plotting order
plot_ord = [1 3 5 2 4 6];


year = 2009;
for month = 7:12;
    [xi, yi, altitude] = plot_interpolation(year,month);
   make_plots(xi, yi, altitude,plot_ord,k,month,year,first_altitude)
    k=k+1;
end

year = 2010;
for month = 1:7;
    [xi, yi, altitude] = plot_interpolation(year,month);
    make_plots(xi, yi, altitude,plot_ord,k,month,year,first_altitude)
    k=k+1;
end
k=k;

function make_plots(xi, yi, altitude,plot_ord,k,month,year,first_altitude)

%devide every 6 surveys in seperate plot
n=1;
while k>6
    k = k-6;
    n = n+1;
end


figure(330+n)
subplot(3,2,plot_ord(k))
pcolor(xi,yi,altitude);
shading interp
title([num2str(year) '-' num2str(month)])
caxis([-5 3])
axis image;
ylim([0 700])
if n==2 && k ==1
    for i = 1:length(xi(1,:))
        vline(xi(1,i),'k:',num2str(i));
    end
else 
    vline(xi(1,:),'k:');
end
set(gcf,'PaperType','A3','PaperOrientation','landscape','PaperPosition',[0.634518 0.634517 40.6797 28.4122])



figure(340+n)
subplot(3,2,plot_ord(k))
pcolor(xi,yi,altitude-first_altitude);
shading interp
title([num2str(year) '-' num2str(month)])
axis image;
ylim([0 700])
caxis([-2.5 2.5])
if n==2 && k ==1
    for i = 1:length(xi(1,:))
        vline(xi(1,i),'k:',num2str(i));
    end
else 
    vline(xi(1,:),'k:');
end
% 
% xlabel('alongshore coordinate')
% ylabel('cross shore coordinate')


set(gcf,'PaperType','A3','PaperOrientation','landscape','PaperPosition',[0.634518 0.634517 40.6797 28.4122])
% 
% % make countour movie
% figure(43)
% [C,h]=contour(xi,yi,altitude,[-8:3]);
% hold on
% contour(xi,yi,altitude,[0 0],'linewidth',3)
% xlabel('along shore [m]')
% ylabel('cross shore [m]')
% ylim([0 1050])
% set(h,'ShowText','on');
% M =getframe(gcf);
% close(43)

