How can I display the value at a point in a figure with mouse (touch screen laptop)

37 vues (au cours des 30 derniers jours)
In my previous experience, if you displayed a matrix as a figure using imagesc, a mouse click on the image would show the value of the point clicked. This is not working in my ThinkPad T480s. I wonder if it's because it has a touch screen. When I use a mouse, mouse clicks don't do anything to the axes element. If I use the touch screen, i can move the figure axes around like with the grab tool.
Being able to click on an image and see the value is very useful to me. How can I enable it?

Réponse acceptée

Rik
Rik le 28 Juin 2019
Modifié(e) : Rik le 28 Juin 2019
A=randi(127,100,150);A=uint8(A);
figure(1),clf(1)
imagesc(A)
datacursormode on
Note that axes interactions changed in R2018b, so there might be some undocumented effects of that, depending on the release you're using on the two computers you describe.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by