How to get heatmap values in appdesigner?
Show older comments
Hi All!
I'm building an app, and I am using heatmap to visualize some data. I am plotting heatmap on a Panel. When I click on a cell of heatmap, it displays X and Y values. For further calculations I want to extract which cell the user clicked on. So what I need basically, is that when the user clicks on one of the heatmap cells fome function registers the coordinates (X,Y values) of the cell that have been clicked on. I don't know if it is possible with heatmap. Maybe there are other plot types with which it is easier to implement. Any solutions or siggestions?
3 Comments
Mario Malic
on 23 Feb 2021
Edited: Mario Malic
on 23 Feb 2021
Hey,
Is imagesc an option for you?
There's also an example on a similar graphic object https://www.mathworks.com/matlabcentral/answers/627703-how-to-get-index-and-color-matrix-from-data-cursor?s_tid=srchtitle
Csanad Levente Balogh
on 13 Aug 2021
Adam Danz
on 13 Aug 2021
It would be simple but accessing the datacursor in heatmap is not simple and replacing it with a customizable datatip is still not supported to my knowledge. heatmap is notoriously difficult to customize and it's often necessary to use alternatives such as imagesc or histogram2 or surf to achieve customization.
Dave B's approach below (also see comments under that answer) is a simple alternative.
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!