control slider in animation disappears

4 views (last 30 days)
robinho robinho
robinho robinho on 15 Aug 2022
Answered: Sai Teja G on 7 Sep 2023
With drawnow or addpoints, an animation is created. Sometimes there's a control slider at the bottom of the animation for me to control the animation speed and scroll back and forth but sometimes the control slider disappears, why is that?

Answers (1)

Sai Teja G
Sai Teja G on 7 Sep 2023
Hi Robinho,
I understand that you are looking to know more about the control slider in the animation while using drawnow or addpoints function.
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 behaviour of the data cursor using various options available in the “datacursormode” function.
To learn more about the "datacursormode" function, you can refer to the following link: https://www.mathworks.com/help/matlab/ref/matlab.graphics.shape.internal.datacursormanager.html
Hope it helps!

Categories

Find more on Animation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!