How to display different graphs depending on the position of the mouse pointer on an image?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Guillaume
el 10 de Abr. de 2017
Comentada: Guillaume
el 24 de Abr. de 2017
Hello,
I have an image and for each pixel, I compute a vector V. I store all my data in a 3D matrix.
I would like to move the mouse pointer over the image and to display at the same time the vector V in a plot next to the image. Is it possible to do this in MATLAB?
It would be something similar to impixelinfo, but instead of getting the pixel position and intensity, I would get a plot with a curve.
Thanks for the answer!
Best regards, Guillaume
0 comentarios
Respuesta aceptada
Rollin Baker
el 13 de Abr. de 2017
Hi Guillaume,
If your image is on a figure, then you could use the 'WindowButtonMotionFcn' callback to invoke a custom function that calls 'plot'. This won't do exactly the same thing as impixelinfo, since the object that contains the text is generated differently than a plot figure, but you may be able to find ways to modify the callback to suit your needs. If this sounds like something that would work, try checking out the documentation page for the callback below:
I hope you find this helpful. Good luck on your project!
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!