%%
id = desb_illustration_id;

fh = figureStyle(@styleThesis,...
    {'figure' 'Position', [1 1 15 22]});

iruns = [0 2:3];
ax = NaN(size(iruns));
for irun = iruns
    ax(irun == iruns) = subplot(length(iruns), 1, find(irun == iruns));
    desb_plot_xbeach_profiles(...
        'id', id,...
        'irun', irun);
    ylabel('Altitude w.r.t. NAP [m]')
    if irun == iruns(1)
        title(sprintf('transect %i', id))
    end
end
xlabel('cross-shore coordinate [m]')

XLim = minmax(get(get(ax(1), 'children'), 'xdata')');
YLim = minmax(get(get(ax(1), 'children'), 'ydata')');
set(ax,...
    'XLim', XLim{1},...
    'YLim', YLim{1})
for i = 1:length(ax)
    text(max(XLim{1}), max(YLim{1}),...
        sprintf('(%s)', char(i+96)),...
        'parent', ax(i),...
        'HorizontalAlignment', 'right',...
        'VerticalAlignment', 'top')
end

%%
% fh = gcf;
% figureStyle(@styleThesis)
tightenfigure
[fpath fname] = fileparts(which(mfilename));
figurepath = fullfile(fpath, '..', 'figures');
set(fh, 'tag', '$HeadURL$ $Revision$')
print(fh, '-depsc2', fullfile(figurepath, [fname '.eps']))
if ispc
    saveas(fh, fullfile(figurepath, [fname '.emf']))
end
saveas(fh, fullfile(figurepath, [fname '.fig']))