ButtonDownFcn not working after zoom, subplots
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two subplots. One generated using imagesc and the other using plot. The window is shown below.
![plots.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222545/plots.jpeg)
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/222546/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.
1 comentario
Respuestas (0)
Ver también
Categorías
Más información sobre Data Exploration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!