How can I animate plotted data over time?

Hi all
I'm training my self on climate models, therefore, I plotted the contour maps, wind direction in 18 layers (6-hour interval) .
How can I display the trajectory of the typhoon I'm working with as animated clips?

1 Comment

Halloween,could you please share me with your Typhoon model thanks

Sign in to comment.

 Accepted Answer

Kevin Phung
Kevin Phung on 23 Jan 2019
Edited: Kevin Phung on 23 Jan 2019
each update of the plot can be shown with
drawnow
https://www.mathworks.com/help/matlab/ref/drawnow.html

More Answers (1)

See attached demo where I made a movie from a figure that was changing over time. I used surf() to create a surface and then take an image of that and embed it into the movie. That was in a loop where I changed the surface at every iteration. You could take a snapshot of your new line plot or whatever. When you play the movie, it shows the surface moving/undulating.

Categories

Find more on Earth and Planetary Science in Help Center and File Exchange

Products

Release

R2017b

Community Treasure Hunt

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

Start Hunting!