How to get the row and column number of a Heatmap cell the mouse is pointing at?

3 views (last 30 days)
I'm displaying a heatmap in one of the ui panels in my GUI (created using GUIDE), and I would like to be able to click on any of the cells in the heatmap and have the corresponding data plotted on a seperate figure. The part I can't figure out is how to create a ButtonDown callback which could get the row and the column number of whichever cell the mouse is pointing at. I know this should be possible as the heatmap already displays this inforamtion when the mouse hovers over the cell (see attached image), but I could not find a way to access it.
GUI.png
So I was wondering if anyone knows a way of getting that information from the heatmap? If that is not possible how should I go about tracking the mouse to get the row and column it's pointing at?

Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!