Generating an animation example

Hi all,

I am new to pygmt and wanted to generate an animation for an earthquake. I could generate an image for maximum values but I don’t know how can I generate an animation. Is there any example so that I can work with and take a look at input data to see how does it work?

Thanks so much

Welcome @mtabbakhha! So the command you’ll need to use is gmt movie, which unfortunately isn’t wrapped in PyGMT yet (see Wrapping movie for pyGMT). That said, you can check out these examples:

You would need to write a shell script (*.sh or *.bat) that handles the plotting of each frame, and then do gmt movie nameofscript.sh ... which will loop over your script, generate each movie frame and make the final animation. Let us know if you need help any help. Good luck!

thank you so much for your help.