Mercurial > repos > public > sbplib
comparison logsurf.m @ 592:4422c4476650 feature/utux2D
Merge with feature/grids
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Mon, 11 Sep 2017 14:17:15 +0200 |
parents | ac1fc1c9e129 |
children |
comparison
equal
deleted
inserted
replaced
591:39554f2de783 | 592:4422c4476650 |
---|---|
1 function [srfHandle, cbHandle] = logsurf(X,Y,Z, lim) | |
2 absLogZ = log10(abs(Z)); | |
3 srfHandle = surf(X,Y,absLogZ); | |
4 | |
5 cbHandle = colorbar(); | |
6 colormap(hot(256)); | |
7 ah = gca(); | |
8 ah.CLim = lim; | |
9 | |
10 oldTickLabels = cbHandle.TickLabels; | |
11 | |
12 newTickLabels = {}; | |
13 | |
14 for i = 1:length(oldTickLabels) | |
15 newTickLabels{i} = sprintf('10^{%s}',oldTickLabels{i}); | |
16 end | |
17 | |
18 cbHandle.TickLabels = newTickLabels; | |
19 end |