figure
% subplot(2,2,1) 
% 
% if exist('et','var')
%     plot(et,'LineWidth',2)
%     [trash,loc] = findpeaks((et(:,2)));
%     %loc = max(size(et))-loc+1;
%     if isempty(loc)==0; line([min(loc)+0.5,min(loc)+0.5],[0 100],'Color','k'); end
% 
%     [trash,loc] = findpeaks((et(:,5)));
%     %loc = max(size(et))-loc+1;
%     if isempty(loc)==0; line([min(loc),min(loc)],[0 100],'Color','k'); end
%     ylim([0 max(max(et))*1.1])
% end
% set(gca,'xscale','log')
% xlabel('time (unitless)','FontSize',16)
% title(current_plot_title,'Interpreter','none')
% ylabel({'space (unitless) *or* number';'of peaks *or* wall accum. flag'},'FontSize',16)
% legend({'Mound half-width';'Mound height';'Net accum. on walls of container';'Number of peaks';'Mound FWQM'})
% box on
% 
% %================
% subplot(2,2,2)
% 
% ss = 30;%spiral samples
% if exist('et','var')
%     moatwidth = ((nx/2) - et(round(linspace(1,(length(et)-1),ss)),5)/2) - min(find(basement==0));
%      %   line(moatwidth,et(:,2),'Color','k','LineWidth',3)
%     scatter(flipud(moatwidth),flipud(et(round(linspace(1,(length(et)-10),ss)),2)),100, ... 
%         fliplr(([1:max(size(et(round(linspace(1,(length(et)-10),ss)))))])),'filled','LineWidth',3)
% end
% xlabel('moat width (km)','FontSize',20)
% ylabel('mound height (km)','FontSize',20)
% title(current_plot_title,'Interpreter','none','FontSize',20)
% set(gca,'FontSize',20)
% 
% box on;axis square;grid off;
% 
% %================
% subplot(2,2,3)

if n>50
h1 = plot(z(round(linspace(1,(n-10),15)),1:nx)','LineWidth',2);
cmap = colormap;

maxcol = max(size(cmap));
        fracti = [1:max(size(h1))]; %round(logspace(0,log10(n-10),15))./n;
    for nn=1:max(size(h1))
     set(h1(nn),'Color',cmap(ceil(fracti(nn)./max(fracti).*maxcol),:))
    end
end
xlabel('x (km)','FontSize',22)
ylabel('z (km)','FontSize',22)
title(current_plot_title,'Interpreter','none')
set(gca,'FontSize',22)
box on
hold on
ylim([-0.1,8])
xlim([20,(nx)])
set(gca,'tickdir','out')
set(gca,'xtick',(nx/2)+[-200:10:200]);
set(gca,'xticklabel',[-200:10:200]);
plot(z(1,1:nx)','LineWidth',2,'Color','k')

%================
%SWEET wet-dry oscillations - red is dry, blue is wet
% for l = 1:2:100
% plot(z(l,:),'Color',[1-dtest(l)/max(dtest) 0 dtest(l)/max(dtest)])
% hold on
% end

% figure;
% contour(diff(z(1:100,21:81)),50)
% grid on
% hold on
% contour(diff(z(1:100,21:81)),[0 0],'k')

%contour(diff(z(1:100,21:81)),50)