view logsurf.m @ 1023:defc9d0cc1f2 feature/advectionRV

Remove incorrect assertion of the number of BC:s
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 07 Jan 2019 12:06:49 +0100
parents ac1fc1c9e129
children
line wrap: on
line source

function [srfHandle, cbHandle] = logsurf(X,Y,Z, lim)
    absLogZ = log10(abs(Z));
    srfHandle = surf(X,Y,absLogZ);

    cbHandle = colorbar();
    colormap(hot(256));
    ah = gca();
    ah.CLim = lim;

    oldTickLabels = cbHandle.TickLabels;

    newTickLabels = {};

    for i = 1:length(oldTickLabels)
        newTickLabels{i} = sprintf('10^{%s}',oldTickLabels{i});
    end

    cbHandle.TickLabels = newTickLabels;
end