PLOT_EXTRAS

Torsten Linders, torsten@oceansurface.se, January 3, 2012

Adds some features to plots of the along fjord transections (and other plots).

grid on

if par_vector

    xlim([0 9000])
    set(gca,'XTick',0:1000:xmax)
    set(gca,'XTickLabel',0:1:xmax/1000)
    xlabel('Along fjord distance (km)')
    if strcmp(par,'intU')
        ylim([-10 10])
        ylabel('Depth integrated horizontal velocity (m^2/s)')
        hold on
            plot([x(1) x(end)],[0 0],'k')
        hold off
    elseif strcmp(par,'time')
        ylabel('Time (Julian Days)')
    end

else

    if not(strcmp(par,'G'))
        colorbar
    end
    if strcmp(par,'eNS') || strcmp(par,'eNSav')
        colorbar
        axis xy
        grid on
        xlabel('S^2 (s^{-2})')
        ylabel('N^2 (s^{-2})')
        set(gca,'XTick',1:2:iS2max)
        set(gca,'YTick',1:2:kN2max)
        set(gca,'XTickLabel',(0:2:iS2max)/iS2scale)
        set(gca,'YTickLabel',(0:2:kN2max)/kN2scale)
        hold on
            plot([1 iS2max*4],[1 kN2max*kN2scale/iS2scale],'k--')
            plot([1 iS2max*1],[1 kN2max*kN2scale/iS2scale],'k-')
        hold off
    else
        xlim([1 1801])
        ylim([1 501])
        set(gca,'XTick',1:200:imax)
        set(gca,'YTick',1:50:kmax)
        if strcmp(par,'shear')
            set(gca,'YTick',0.5:50:kmax)
        elseif strcmp(par,'shear_h')
            set(gca,'XTick',0.5:200:imax)
        end
        set(gca,'XTickLabel',0:1:xmax/1000)
        set(gca,'YTickLabel',0:10:zmax)
        xlabel('Along fjord distance (km)')
        ylabel('Depth (m)')
        hold on
            plot(trackdist/dx,trackdepth(:,1)/dz,'k','LineWidth',2)
            plot(trackdist/dx,trackdepth(:,2)/dz,'m-')
            plot(trackdist/dx,trackdepth(:,3)/dz,'m--')
        hold off
    end

end