create custom mouseover callback?

14 visualizaciones (últimos 30 días)
sigguy90
sigguy90 el 6 de Abr. de 2022
Respondida: sigguy90 el 26 de Abr. de 2022
I have a method to execute a custom callback function upon mouseover of scatter3 plotted points. Essentially, the function prints text in a text edit field of my app. This method relies on setting the UpdateFcn of the datacursormode for the entire figure. Now I would like to have two different axes in my figure, so that method won't work anymore. How can I create a custom callback for a mouseover interaction?
  1 comentario
Rik
Rik el 6 de Abr. de 2022
You could use the window button motion, but you would have to make sure to put a fast check at the start of it to keep the performance reasonable. That way you can determine which axes the cursor is hovering over.

Iniciar sesión para comentar.

Respuesta aceptada

sigguy90
sigguy90 el 26 de Abr. de 2022
I implemented this using iptSetPointerBehavior. The datatips corresponding to each scatter3 object are created and stored. The helper function for pb.enterFcn then sets which datatips are enabled according to which axes is being moused over.

Más respuestas (0)

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by