view logsurf.m @ 1152:010bb2677230 feature/rv

Clean up in +rv/+time. Make the time stepping more efficient by not storing unnessecary properties in the RK-RV time steppers
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 05 Mar 2019 10:53:34 +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