Borrar filtros
Borrar filtros

'addpoints' animation with a control slider

5 visualizaciones (últimos 30 días)
feynman feynman
feynman feynman el 3 de Dic. de 2022
Comentada: feynman feynman el 15 de Feb. de 2024
Somehow making an animation with 'addpoints' enables a control slider for the user to slide back and forth to view the animation, but sometimes the slider disappears. Which syntax ensures that it appear?
  10 comentarios
Adam Danz
Adam Danz el 13 de Feb. de 2024
I'm not aware of a slider that automatically appears after running the code you shared.
If this is run in an app or live script, a uislider could be added, though.
feynman feynman
feynman feynman el 15 de Feb. de 2024
Yes, in a live script! My newest concern is how to stop an animation loop perhaps through a uicontrol in a live script?
https://www.mathworks.com/matlabcentral/answers/2079766-how-to-stop-loops-or-close-figures-in-live-scripts?s_tid=srchtitle

Iniciar sesión para comentar.

Respuestas (1)

Vidip Jain
Vidip Jain el 20 de Mzo. de 2023
The slider you are referring to is called a "data cursor" in MATLAB. By default, it appears when you create a plot with a line object, and you hover over the line with your mouse cursor. However, it may not always appear when using “addpoints” to animate a plot.
To ensure that the data cursor appears, you can use the “datacursormode” function in MATLAB. This function allows you to enable or disable the data cursor mode for a specific plot or all plots in a figure.
You can also customize the appearance and behavior of the data cursor using various options available in the “datacursormode” function.
  1 comentario
feynman feynman
feynman feynman el 27 de Abr. de 2023
thanks a lot. "it may not always appear when using “addpoints” to animate a plot." Does the appearance depends on luck? How can this be a random event?

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by