imagesc output: how to re-update the matrix image only, but keep other things intact, including colorbar, axis tick, axis label, annotation, text...?
Afficher commentaires plus anciens
Hi, I want to update the imagesc generated figure window, just update the pixel matrix values of same dimension size, but keep other things intact, including cplormap, colorbar, axis tick, axis label, annotation, text,...
But the code below reset and remove everything:
f = figure;
imagesc([1,2,3;4,5,6;]);colorbar;
text(1,2,'apple')
set(gca(f),'YTick', [1,2],'YTickLabel',{'AAA','BBB'},'TickLabelInterpreter','none');
% update the matrxi (of same size) only, but leave the tick labels,text, annotations,...all intact
figure(f)
imagesc([4,5,3;4,7,6;]); % this removes all the tick labels,text, annotations,..
Is there a way to solve this problem? I am using R2016a.
Many thanks for the suggestion.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Colorbar dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

