How to highlight a certain pixel when using the imagesc command?

15 vues (au cours des 30 derniers jours)
Daniel Tanner
Daniel Tanner le 17 Mar 2020
Commenté : Daniel Tanner le 20 Mar 2020
I have a small 3-by-7 matrix which I have plotted using the imagesc() function to get a small map of an area of data.
Is there any way to be able to highlight a certain pixel with a red outline or something similar?
Many thanks!

Réponse acceptée

Sai Veeramachaneni
Sai Veeramachaneni le 20 Mar 2020
You can use something similar to below code.
imagesc(floor(rand(3,7)*10))
hold on
plot([2.5,2.5,3.5,3.5,2.5],[3.5,2.5,2.5,3.5,3.5],'r','linewidth',3)
hold off
  1 commentaire
Daniel Tanner
Daniel Tanner le 20 Mar 2020
Brilliant thank you! That is exactly what I wanted.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by