Hi I have plotted a graph(with pcolor option). Which is a 2D plot showing the values of salinity of florida bay. I want to see the value of salinity which is plotted against Long and lat (in x and y direction). I have enabled the datacursourmode on option but when I click on a certain point it shows only x and y value which is obivious. But I also want the value of salt on that point which I have plotted. Is there any way to get that?

 Akzeptierte Antwort

Image Analyst
Image Analyst am 3 Nov. 2016

0 Stimmen

Don't use pcolor. Use imshow(), then call impixelinfo(). As you mouse around it will show you x, y, and the value of the salinity matrix.
imshow(salinity, []);
colormap(gca, parula(256));
hp = impixelinfo();

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by