ButtonDownFcn not working after zoom, subplots

2 visualizaciones (últimos 30 días)
JG
JG el 3 de Jun. de 2019
Comentada: Edoardo_a el 5 de Abr. de 2024
I have two subplots. One generated using imagesc and the other using plot. The window is shown below.
plots.jpg
I use the buttondownfc function to respond to mouse clicks in the top image and retrieve the coordinates. I then update the lower plot using the coordiantes. Shown below is the window updated for a different location.
plots2.png
This work fine until I zoom in on the top image. After zooming in, the function I created to respond to buttondownfc that updates the lower plot is no longer called. I've searched for "buttondownfc not working after zoom" and have seen some posts. It appears that axis are being reset or some such thing. I've created another function that responds when the top window is zoomed and I've tried to "clear all" and "reset handles" and "hold all" and createing "new next plots" in addition to any number of other fragments of code I've found searching the help boards. Is there an accepted "best practice" way to do this? Again, I'm trying to update one subplot when there is a mouse click in another subplot (the image). My code works until a zoom is performed on the image.

Respuestas (0)

Categorías

Más información sobre Data Exploration en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by