MATLAB: Colormap color levels on cursor

colormapMATLABpatch

I have a 3 column matrix which is x,y, and C. x and y values are coordinates and C value is intensity. I plot a diagram with using "patch" command.
On figure i just get x and y values on cursor. I want to see intenstiy values on colormap. How can i do it?
Note:
I have tried before meshgrid and countourf but it takes a lot of time to create figure because i have many data points. I use for loop for every rectangle so it takes a lot of time. When i do not use for loop it creates a wrong shape.
Anyone can help me?

Best Answer

Here is direction
You have position of cursor in variable pos
You can access to FaceVertexCData with command
get(h,'FaceVertexCData')
You can access to XY data too:
get(h,'Vertices')
So all you have to do is to find some connection between all this data. Find index of pos in Vertices data and use it to display FaceVertexCData
123.png