function compare_transects(data1,data2)

close(8)
figure(8)
subplot(2,1,1)
hold on
plot(data1.dist, data1.z,'b','linewidth',2);
plot(data2.dist, data2.z,'r','linewidth',2);
% xlabel('Distance from waterline [m]')
ylabel('Elevation relative to NAP [m]')
title('Cross section over transect xx')
legend('Survey 2009-6-10','Survey 2009-7-17','location','northwest')


subplot(2,1,2)
hold on
plot(data1.dist,data2.z-data1.z,'k','linewidth',2)
ylim([-0.5 0.5])
xlim([0 250])
plot([0 300],[0 0],'-.g')
xlabel('Distance from waterline [m]')
ylabel('\Delta H')
title('Differences over transect xx')
