Tuesday, June 28, 2016

Create Clickable imagesc for 2D data

Looking at the figure is fun, specially if you can click and get the values. So, created this little function which can give you title and data tips @cursor location.
function imagesca(x, titlewant)
h = figure;
imagesc(x);
colorbar
try
    title(titlewant);
catch ME
    title('Figure')
end
datacursormode on

No comments: