![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/278302/image.png)
How to highlight a certain pixel when using the imagesc command?
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Daniel Tanner
el 17 de Mzo. de 2020
Comentada: Daniel Tanner
el 20 de Mzo. de 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!
0 comentarios
Respuesta aceptada
Sai Veeramachaneni
el 20 de Mzo. de 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/278302/image.png)
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!