The Generic Mapping Tools and Animations for the Masses

Generic Mapping Tools (GMT) is a well‐known set of software originally developed for geosciences, allowing scientists in climate and solid earth disciplines to routinely create publish‐ready maps and graphics. However, GMT users rarely make animations despite their undeniable benefit for understanding and teaching dynamic processes. As reading habits shift from print to digital, capitalizing on animations for illustrating scientific concepts is more accessible than ever. In the latest GMT version (6.5), we have added and refined the movie‐making modules, alleviating the time‐consuming steps that would hinder GMT users from making such animations. In this paper, we will explain how GMT's “movie” module works and provide six representative examples, from basic to more advanced, to show some of its key features. We hope our presentation will encourage the masses to routinely create animations for their publications.


Introduction
The Generic Mapping Tools (GMT; www.generic-mapping-tools.org) is a well-known set of software for the geosciences (Wessel & Smith, 1991, 1995, 1998;Wessel et al., 2013Wessel et al., , 2019)), in particular in climate and solid earth disciplines.GMT is also a prerequisite for many other well-known software infrastructures, such as MBARI/LDEO's MB-System (Caress & Chayes, 1995) for multibeam processing and mapping of the seafloor and Scripps Institution of Oceanography's GMTSAR (Sandwell et al., 2011) for radar interferometric analysis and imaging of crustal deformation.With many tens of thousands of users all over the world, GMT remains essential for data processing, mapping, and plotting workflows.
Scientists routinely make illustrations with GMT but rarely animations, yet understanding spatial and temporal changes is critical in natural sciences.Anecdotal evidence suggests that transformative discoveries were greatly assisted by animations.The transform fault concept in plate tectonics (Wilson, 1965) was difficult to explain, so Tuzo Wilson made paper flipbooks to show its evolution (Eyles, 2022).Propagating rifts (Hey, 1977) were even more complicated, and many remained unconvinced until Richard Hey and his students made a computer animation (Atwater, 1981).Recently, animations in geosciences have proven to be increasingly useful for efficient communication (Stern et al., 2020;Wang et al., 2022).Despite these obvious benefits, their infrequent utilization by scientists is due to the fact that their creation required guru-level expertise, with expert programmers producing grids or columns that vary with time and whose changes are represented by variable geometry or colorization.For non-experts, producing animations is even more challenging (and maybe costly), often involving laborious postproduction processes and reliance on third-party (often proprietary) software or services.
The American Geophysical Union (AGU) pioneered the online-only journal Geochemistry, Geophysics, Geosystems in 2000 and their Information Technology Committee discussed enabling "dynamic content" in AGU journals.Well over 20 years later, AGU (now via publisher Wiley) publishes 25 Earth-science related journals, but only two (Advances and Community Science) allow dynamic content in the article (the others use supplementary files).Elsevier, another large publisher of science, has over 2,600 journals across all fields but nevertheless offers dynamic content in all the journals themselves.As reading habits shift from print to digital, capitalizing on dynamic figures for illustrating scientific concepts is more accessible than ever.With existing technology requiring minimal effort for implementation (PDFs support animation since 2008, version 1.7 Adobe Extension Level 3), this article aims to encourage publishers and unions to adapt to the times and habits of readers.This paper is intended for an audience that already uses (or at the very least know about; those who want to learn could check the latest online workshop in https://github.com/GenericMappingTools/gmt-for-geodesy)GMT for their science and geomatics illustrations and we assume that GMT modern mode syntax (Wessel et al., 2019) is familiar to the reader.
In the latest GMT version (6.5), we have added and refined the moving-making modules (movie, events, and grdinterpolate) that empower users to create animations by taking over non-trivial tasks.The user remains to focus on the animation's content and its main features (resolution, format, frame rate, etc.).Although wrappers to GMT exist from MATLAB (Wessel & Luis, 2017), Python (Uieda & Wessel, 2017), and Julia (Luis & Wessel, 2018), movie scripts only support Bash, C shell, and DOS batch script languages for efficiency.Since GMT's fundamental graphic model is vector based (PostScript), we achieve state of the art quality for text, line effects, and symbols.Herein, we will explain how GMT animation works before highlighting some representative GMT animations, from the basic to more advanced, and demonstrate how simple it is to grasp for any GMT user.When AGU/Wiley will allow science-heavy journals like G 3 to embed movies, we can finally celebrate the arrival of dynamic content.

Technical Matters
A movie is made up of individual equally sized images (or frames) that are chronologically sorted and then assembled into a movie format, such as MP4, GIF, WebM, or any other.Prior to GMT 6.0, ambitious movie makers would have to write complicated scripts where the advancement of frames was explicitly done by a shell loop, and then perhaps that frame counter was used to make some changes to other parameters so that when the plotting started the plot would differ from the previous one.Adding labels and progress indicators were tasks to be scripted up and was quite complicated.At the end of the script, you would have to convert your PostScript plot to a raster image with a name that is lexically increasing, and then later you would use some external software to assemble the movie.Hence, only very brave GMT users attempted to make GMT animations.
GMT 6 (Wessel et al., 2019) changed all that by adding new modules movie, events, and (from 6.1) grdinterpolate.We will describe the main aspects of these three modules in detail.The more technical aspects are described in the documentation.Throughout this article (and summarized in Table 1), we will use bold-face letters for GMT options, italics for parameters, and bold-italics for GMT modules (in lower-case letters).The parameters that the movie will set internally (in UPPER-CASE letters) are thus available to your script.As these change with time, your plot changes since it will use some of those parameters to produce variations.

The Movie Module
Movie is the module that alleviates the time-consuming steps that would hinder GMT users from making animations.It takes care of the non-trivial tasks like loop over frames, selecting data, changing variables, determining visible events, and rasterize frames to build the final movie.It works in parallel via the available cores on the user's computer (therefore it is advisable to use a PC with many cores to speed up the animation creation process).It lets the user focus on the design of the animation and eventually on the tweaking aspects like dimension, resolution, format, frame rate, labels and progress indicators, among other features.Here, we explain the main features of this module.

The output(s) file(s)
There are two types of products that can be generated with movie: (a) an image and/or (b) a video.At least one must be selected.The image corresponds to a single master frame that can be used as a cover page and it is requested via the option -M.The available video formats are animated GIF, MPEG-4, and WebM and are specified with -F.Alternatively, users can just create all the frames and use FFmpeg or GraphicsMagick (which are used under the hood to create the mentioned formats, or other software) to assemble the animation.The creation of all the frames only happens when -F is used.By default, all the movies will have a display frame rate of 24 fps (frames per second).This can be changed with the optional argument -D.The type of product defines the extension of the output(s) file(s).It(s) name is indicated through the -N parameter.

The Frame Loop
In an animation, the illusion of movement is created by a rapid succession of frames (at least ca.12 fps) that minimally differ from each other.The key idea in movie is for the user to write a single script (called mainscript) that makes the main idea of the animation and it is used for all frames.To introduce variations in them (otherwise, the movie would be incredibly boring), we use specific frame variables (see Table 2) that will automatically be updated as different frames are built.So, what are those variables?It depends on how you specify the length of the movie via -T.You can simply specify how many frames (e.g., -T150 and get frames 0, 1, …, 149), or a specific range of times, such as -T120.6/400.6/0.2 for "time" steps of 0.2 from 120.6 to 400.6 or -T2021-08-01T/2022-03-01T/1d for 7 months of daily frames.Time can thus be anything that is monotonically increasing throughout the movie; it is often some form of time but could be distance or similar measures.Very often, you have a time-series of some sort whose records correspond to the frames.Hence, the row in the table matches the frame counter (both start at zero).In all these cases, regardless of how time is defined, the parameter FRAME_NUMBER is always available for use in your script.
While this is useful, animation of a real data set may require access to more variables that change per row (i.e., per frame).As an example, consider these rows from a much larger input file given to movie -T: Our script may need to access these values, but because the loop over frames (i.e., rows) is hidden, we only need a mechanism to access columns.Since all GMT-compliant data tables have [optional] leading numerical columns followed by [optional] trailing text, the numerical entries are named MOVIE_COL0, MOVIE_COL1, etc. and the trailing text is either a single string called MOVIE_TEXT or we break it into separate words MOVIE_WORD0, MOVIE_WORD1, etc. with option -T's modifier +w.Thus, if you need any of those parameters to label the movie via -L, then they can all be accessed with customizable formatting.

Your Canvas
Since we are plotting each frame, and GMT users typically make a plot of some standard size (e.g., often a paper size, say A4 or US Letter), we need to understand how to determine what our "paper size" is so we can do our composition correctly.We call this paper the canvas (Figure 1) and it is a setting we control.The canvas setting in the movie module (-C) determines basically two things: The size of your "plot paper" and what resolution (in dots per unit; dpu) at which this canvas is converted to a raster image.You should compose your plots using the given canvas size, and movie will make proper conversions of the canvas to image pixel dimensions.
The easiest way to specify your canvas is to use the presets standard formats.By simply selecting a format, the pixel dimensions and resolution are set.For instance, if you want to make an HD movie, you select -CHD.This will compute the required dpu so that the rasterized frame is 1920 by 1,080-the standard HD movie pixel size.If you want a 4k movie, then -CUHD is your choice.However, if you need a custom canvas (say a portrait movie or a square movie), you will need to tell -C both the dimensions and the resolution.For example, selecting a canvas that is 20 cm square and to be rasterized to 600 × 600 pixels (which means a dpu of 30) would be -C20cx20cx30 Figure 1.The MOVIE_WIDTH and MOVIE_HEIGHT parameters (Table 2) reflect your canvas dimension.You can use the regular -X and -Y options to set a logical origin for your intended plot and your projection parameters (-R and -J) indicate the area selected for plotting (gray).The nine dashed boxes show where you may place automatic labels (e.g., frame number, elapsed time, custom text, etc. via the -L option) or automatic progress graphs (similarly via the -P option).
(or alternatively -C600x600x30c).The movie command conveniently stores the canvas dimension and resolution settings as parameters (Table 2) that are available to be used in your shell script instead of hardwiring values that you may forget to change if you try another -C setting.

Labels and Progress Indicators
The user's main task is of course to compose the scene and add plot commands to generate the frame plot.A common yet often tedious task is to add either a label that needs updating per frame or some sort of graphic that indicates progress (i.e., how far into the movie are we at this frame).The movie module offers two repeatable options that greatly simplify these tasks.First, let us examine text labels.As shown in Figure 1, you may place a label anywhere.The nine standard text justifications can be used as shorthand for placement, but modifiers are available to shift placement relative to these locations.Once you determine where to place the text, the next step is to select the type of text to be placed.The -L option offers directives for a static string (no change with frame number-suitable as a fixed title), elapsed time, frame number, percentage of completion, formatting a numerical data column (e.g., MOVIE_COL3), the whole trailing text (MOVIE_TEXT), or just a word (e.g., MOVIE_-WORD2).A long set of modifiers allows -L control fonts, formatting, color, shading, surrounding outlines, and more.
Unlike the label option -L, the progress indicator option -P places one of six progress bars or circles (Figure 2) at the selected location (same setup as for labels).However, only the three first bars, with directives a, b, c, can be placed anywhere since they are pie or circular arrows.The other three (d, e, f) are linear progress bars of some type and can only be placed on the sides (justifications ML, MR, TC, and TB, Figure 1).As for labels, you can offset these selections to place any progress indicator wherever you want.The modifiers to -P allow a wide selection of colors and pens and similar adjustments, including a running label.Note that both -L and -P are repeatable (up to 32 separate items); hence, it is simple, for instance, to place both a frame counter in the top left corner and the elapsed time in the top right corner without coding anything into the main movie script.

Static Elements of Animation
To minimize processing time, it is recommended that any static part of the movie be considered either a static background (to be made once by the optional background script; see -Sb) or a static foreground (to be made once by the optional foreground script; see -Sf); movie will then assemble these layers into each frame automatically.However, instead of a GMT script, you could supply a PostScript plot that shall serve as background or foreground instead.The requirement is that the dimensions must match the plot being generated by the mainscript.Also, any computation of static data files to be used in the loop over frames can be produced by the background script.Any data or variables that depend on the frame number must be computed or set by the mainscript or provided via the parameters discussed above.

Custom Parameters
It can be convenient to define some of your own constant movie parameters so that if you decide to change some of them then anything that derives from those constants will not need to be changed as they will do so automatically.For instance, perhaps you wish to use a variable MY_REGION that specifies the map region and MY_PROJ the projection to be used, then these assignments can be done in a separate script passed to movie via -I.This script (called in.sh in the examples) will be ingested and added to the hidden machinery that operates under the hood.Thus, you could use your fixed custom variables and compute derived quantities in that script and the derived parameters can then be accessed in your main movie script, just like the MOVIE_* parameters.This option is mainly useful when working with complex animations that include a main script and background/ foreground script.

Title Sequence and Fading
The complete movie may have an optional leading title sequence (selected via -E) of a given duration.A short section at the beginning and/or end of this duration may be designated to fade in/out via the designated fade color (black by default).The main animation sequence may also have an optional fade in and/or out section (-K).Here, you can choose to fade on top of the animation (which means you lose the first and last frames due to the fading) or you can "freeze" the first and/or last animation frame and only fade over those static images (via modifier +p) in order to preserve the whole animation sequence (Figure 3).

Adding an Audio Track
It is possible to add an optional audio track to the complete movie (selected via -A).Use +e to stretch the audio track to exactly fit the length of the animation (provided the scaling is not less than 0.5 or larger than 2.0).The file is in mp3 format.

The Events Module
A very common feature to be plotted in a movie is what we call an "event."Events have a start and end time and thus, a symbol representing such an event should only be visible in the animation while the event is ongoing.
Consider that you have a large data set of events of which you wish to make an animation.For any given frame (i.e., event time) we need to determine which of the numerous events are active at that point and only plot those events, not the others.Checking for this in our movie script would be tremendously tedious and reminiscent of pre-GMT 6 scripting.Because this processing is so involved, we added the module events to handle this sorting of the data.Events requires a time column in the input data and can be used to plot symbols, lines, polygons and labels for one moment in time.This module must be included in the mainscript and requires the option -T to get the "time" from the movie module.

Handling of Event Symbols and Labels
The events module effectuates the events plotting by determining the size of the symbol for an event (via the option -S).It should be zero before and after an event is active; hence, we plot the symbol representing the event as long as its size is nonzero.If this is all we do then the animation would, for some frame N, suddenly show a new symbol and it would be a constant symbol in size, color, transparency until a later frame M, at which point the symbol vanishes because the event has ended.This behavior is illustrated in Figure 4. Here, the green curves represent the default behavior: Zero size outside the event window.In order to make more interesting movies, we have broken the default curve into several optional sub-periods, including ones that begin prior to the event.We call that period the rise time, and by starting the size-amplitude curve for the start of an event we can draw attention to that single event by temporarily boosting its size far beyond its nominal size (here unitary).We then let the symbol remain large during the plateau phase before we let it return to its normal size during the decay phase.Here it stays until the event ends, at which point we may add a fade phase where we shrink the symbol down, possibly to zero.Thus, the resulting solid curve in Figure 4a illustrates the temporal evolution of a single event symbol as time goes from before the event happens to after the event has ended.This alternative size curve draws attention to the arrival of this event.
As Figure 4 shows, other symbol attributes can also be treated similarly, and separately.Figure 4b shows that the color of the symbol can be manipulated via an intensity curve (default would be zero), and Figure 4c shows that we can also adjust the transparency of the symbol (Default is no transparency during the event).Another more subtle adjustment is to add a correction to the data sets z-value (e.g., a measure of the event, such as magnitude), which then via the CPT lookup results in a change in the color hue (Figure 4d).
Events may have labels (if the symbol record has a trailing text).By default, the label is plotted at the same time as the symbol and disappears when the symbol ends.However, we can adjust the transparency curve so that the label appears and disappears more smoothly and even add an offset between the appearance of the symbol and label.With these manipulations, one can make a very complicated animation without any scripting beyond playing with events's -E and -M options.To plot the label is required to use the option -F.
In the end, each single event in your data set receives its own (up to five) adjustment curves, all shifted to fit each event's begin and end times, and then events sorts out which one shall be included in a particular frame and what its attributes will be.We compare the evolution of two circles in Video 1: The green circle uses the default adjustment curves (step-function for size) while the red circle is connected to a more elaborate adjustment curve for size, color intensity, and transparency.We also add labels for both circles and let the green inherit transparency changes.

Handling of Lines
Animations of lines (such as ship or satellite tracks) should be able to handle attributes such as variable line thickness and color.However, the PostScript language does not have any operators to handle variable-feature lines.We solve this difficulty in events by preprocessing line data and converting them to dense point clouds via the -A option.Now, the -M machinery discussed in Section 2.2.1 can be used to plot the lines via circles whose attributes can change with position and time.Hence, we are able to draw variable-thickness pens and variable-color and -intensity pens since the lines are simply a collection of dense points by just adjusting their size and/or color.

The Grdinterpolate Module
Animation of slices through a 3-D volume (or 3-D grids) of evolution of a data set through time (with each time stored in a 3-D cube) may require procession.For instance, a movie requires a constant time-step between frames, yet many data are not sampled equidistantly and hence, we will need to interpolate in-between available data slices.We added the new grdinterpolate module in GMT 6.1 for this reason.This module can handle non- Here we seek to whiten the symbol during the event arrival, as well as darken it during a permanent coda phase.(c) A symbol may go from being invisible to reaching full opaqueness at the event's beginning time, finally fading to a near-invisible stage after reaching its full duration.(e) A symbol may go from a constant color to changing colors at the event's beginning time, finally fading to a different-colored stage after reaching its duration.This curve is scaled by the amplitude [1] and added to the z-data before CPT-lookup occurs.(e) A label (with or without an accompanying symbol) may go from being invisible to reaching full opaqueness at the event begin time, staying visible for the given duration, and then finally fade away completely.For labels, the plateau and decay periods do not apply.
equidistant (in time or depth) cubes (3-D netCDF) or sets of 2-D grids and perform interpolation onto an equidistant array of output times (or depths) required in the movie.

Examples of GMT Animations
We will show here six examples that go from very basic to more complex.We recommend you connect to our public GitHub repository for this paper and try to run the various examples on your own computer (https://github.com/GenericMappingTools/gmt-2024-animation).At the end of the script execution, an MP4 video and, in most cases, a PNG image will appear in the starting directory with the same name as the script.For this paper, GMT version 6.5 should be used (Wessel et al., 2024).Apart from these examples, the GMT YouTube channel (https://www.youtube.com/@TheGener-icMappingTools)and the animation gallery (https://docs.generic-mappingtools.org/dev/animations.html) show many additional movies and the scripts required to make them.

Spinning Moon
Our first movie is a one-liner, if you don't count the two lines of gmt begingmt end and the movie command that runs it all.Given that GMT remote data sets are always on tap from the GMT cloud (and with the GMT 6.5 release we added several celestial bodies such as Mars, Mercury, the Moon, Pluto, and Venus), we decided to image the Moon's topographic relief as we watched it spin 360°(Video 2).This tiny five-line script is all it takes: cat <<-'EOF' > main.shgmt begin gmt grdimage @moon_relief_06m -JG-${MOVIE_FRAME}/ 30/${MOVIE_WIDTH} -Rg -Bg -X0 -Y0 gmt end show EOF gmt movie main.sh-C20cx20cx30 -T360 -Fmp4 -Mf,png -NMovie_Moon The -T360 gives frames 0, 1, …, 359 and we use their negatives (i.e., -$MOVIE_FRAME) as the central longitude for the azimuthal map (negative so the Moon will spin the right way).Type or copy these <200 characters into a terminal and a couple minutes later (depending on the available cores in your pc) you have a 360-frame MP4 movie of the Moon and a PNG image of the first frame.

Indiana Jones Map Animation
Now we will recreate the iconic flight animation of the Indiana Jones movies.We will show Dr. Jones' flight from New York to Venice, as seen in the "Last Crusade" film (Video 3).Our animation has two scripts: pre.sh and main.sh.In the script pre.sh (which is a background script run just once) we first define the list of stopover cities with their coordinates, which are stored in the cities. txt file and we use sample1d to interpolate between them every 10 km along the great circle connector and we store the results in distance_vs_frame.txt: - Let us analyze this file, which will be later used as input for the -T option of the movie module.It has a total of 767 records, corresponding to the total number of frames of the animation.In table 3 we show the first records, indicating the attribute for each column, and the name of the dynamic variable to be assigned.
Finally, the critical movie main.shscript is used to plot the map frames with the flight path.For the first task, we use coast to create a map centered on the plane's changing longitude and latitude (indicated through the dynamic variables, see Table 3).The map will have the same width as the canvas as it will not have any offset (due to -X0 -Y0).For the geographic region, we define the half width ( 480) and half height (270) in km.Notice that the ratio between them is the same as the canvas of the chosen resolution (16:9), producing a figure area that matches exactly the canvas (i.e., the screen).The other options define the color of the dry and wet areas and the pen for the international boundaries.With the events module, we draw the evolving flight path from the distance_vs_frame.txtfile with a thick red line.The distance from New York (indicated through the dynamic variable ${MOVIE_COL2}) will be used to define the "time" of the animation.We use -Es for the data to be interpreted as symbols and -Ar to indicate that the data should be joined together to form a line or trajectories.

Indiana Jones Map Animation: Complex Version
Now we are going to make a more complex version of the previous animation.The main enhancements are the soundtrack, the title sequence, labels and locations of the cities (Video 4).For the soundtrack, we will use a 35- s trimmed version of "The Raiders March."As we want the whole animation to last as long as the audio, some calculations are necessary.The title sequence will span 6 s (to match the intro of the song).The animation sequence itself should last 27 s since we are also going to include transitions at the beginning and at the end of 1 s each.The previous version lasted almost 32 s.This was due to the relation between the number of frames ( 767) and the display rate (24 frames per second by default).The amount of frames was the result of choosing an interpolation interval between cities of 10 km (as we will ignore the fact that our choice implies Dr. Jones' plane travels at a constant speed).Now, for this version, we have to make some initial calculations to get the appropriate interpolation interval.First, we include a variable (animation_duration) in in.sh with the time in seconds.
Then, in the pre.sh script, we do the calculations.We get the total distance to Venice and then the line increment per frame.This increment will depend on the movie rate that we define in the movie command.Here, we also add a modifier (-AR+l) to get rhumb lines (so they are seen as straight lines called loxodromes in a mercator map).
animation_duration=27 # in seconds # Get length of travel and compute line increment in km per frame dist_to_Venice=$(gmt mapproject -G+uk cities.txt To incorporate the title sequence, we introduce a new script (title.sh),which contains all the necessary information.This includes the title of the animation, accompanying text, and placement of two logos.
To include city names, two commands need to be added.First, in pre.sh we create the label.txtfile with the information to determine when to display labels of each city.Then, in main.shwe use events to plot the names of the cities and their respective locations.
gmt mapproject cities.txt -G+uk > labels.txtgmt events labels.txt-T${MOVIE_COL2} -L500 -Mt100+c100 -F+f18p+jTC -Dj1c -E+r100+f100+o-250 -Gred -Sc0.3cFinally, in the movie command, we use -A to add the audio file and -E to set the properties of the title sequence (6 s duration and a fade out of 1 s).In this case, we create a movie of 60 frames per second (-D) and add a fade in and out, each lasting 1 s for the movie (-K+p).

Messi's Goal Animation
Let us create a map-based animation showing the progression of Lionel Messi's goals over time until 2023 (Video 5).The animation created will display a main map along with an inset on western Europe and will show a circle of different size and color depending on the amount of goals scored on each game (from 1 to 5).All the information needed is included in the Messi_Goals.txtfile (see details in Table 4).
The script can be broken down into five steps.For the first step, we use mapproject to calculate the height of the main map.It will depend on the region and projection of the main map, and on the width of the canvas.This is important because we are going to use a custom canvas that fits the main map.
# 2. File with variables used for the inset map cat << 'EOF' > in.sh # Region, projection, width map and offset in X/Y direction inset_map_region=PTC,ESC,GB,DE+R1/3/1/-3.5 inset_map_projection=M5.5c # Mercator map of 5.5 cm width  In the third step, we create the pre.sh script for two purposes.First, it creates the necessary files for the animation from the input file (Messi_Goals.txt).This involves organizing and scaling the data with convert (see Table 5).
# 1. Reorder and scale data: gmt convert Messi_Goals.txt-i1,2,3,3 +s400,0 > data_scale_by_400.txtgmt convert Messi_Goals.txt-i1,2,3,3 +s80,0 > data_scale_by_80.txt In the following step, we calculate the cumulative sum of goals over time and save the data in a file named dates_vs_goals.txt(see Table 6).This file has all the dates every 3 days along with the total number of goals scored up to each respective date.In total, it has 2,405 records (that will be the number of frames of the animation).
# 2. Create file with dates every 3 days versus cumulative sum of goals gmt math Messi_Goals.txt-C3 SUM -o0,3 = | gmt sample1d $(gmt info Messi_Goals.txt-T3d) -Fe -fT > dates_vs_goals.txt The second purpose of pre.sh is to make a static background plot.These include both maps (main and inset) and a colorbar.The maps will consist of satellite images with shaded relief and international borders.
# 1. Plot main map # a. Create intensity grid for shadow effect gmt grdgradient @earth_relief_05m_p -Nt1.In the fourth step, we create the main script (main.sh).It uses events twice to plot the symbols from the files created in the previous step with the same parameters (see Section 2.2.1 and Figure 4).We use days as time units.We set the rise phase to 6 (time units) and the decay phase to 18.The symbols are magnified 2.5 times during the rise, and then fade to 0.5 in the coda (Figure 4a).The color intensity increases 5 times and then returns to its original value (Figure 4b).The color transparency is set to 0 at the coda (i.e., they are still visible after the duration of the event; see Figure 4d).Finally, we create the animation with movie.We use the three created scripts and the variables defined in step 1 to set the custom canvas dimension.We use -L to add two labels from the dates_vs_goals.txtfile (Table 6).The first will be located in the top right of the canvas and will indicate the date, which is the first column of the file (-Lc0).
The second one is in the top left and shows the number of goals scored at that date.Both labels have a white background panel, border and shadow with the same properties.

3-D Density Distribution of the Emperor Seamount Chain
In research related to the evolution of the hotspot seamount chain, Wessel et al. (2023) developed a fully 3-D evolutionary seamount density model which will be used to load the lithosphere and analyze the flexural deformation taking place below this evolving seamount chain.Video 6 shows moving cross-sections through the chain, allowing one to stop and examine where the densities are higher or lower.We now describe the main commands that allow it (you can see the full script on the GitHub repository).In order to do that, we first create a file with a long-strike y-profiles (included in the pre.sh script), and then use gmt tools (select, grdtrack) to select the data along each profile (in the mainscript) and plot them as prisms for the density values, kink lines and topographic outlines.rainforests, cyclones, or atmospheric rivers, while the two time-series on the right hand side provide insights on the seasonal cycle and longer trends.The two countries highlighted for this purpose are Argentina (code "AR," south hemisphere) and France (code "FR," north hemisphere), where two of the authors are from.To not further extend the present article with script description, we invite interested readers to review the commented code on GitHub.

Advanced Concepts
The limitations with print mode are extensive, and for science to advance we need to be able to make timevariable presentations; this means movies and animations must be acceptable in submitted manuscripts.Currently, with the print mode, it is possible to represent data extending in one dimension (1D) with profiles.It is also possible to plot data (e.g., temperature) over time (or any other dimension, X, Y, or Z).It is also possible to use the technique of representing data in 2D, where different colors are used to represent the values in 2D.The classic example is a map.Note that in the latter case, the data itself is not displayed but is represented by colors.In these cases, the color palette must be chosen carefully to avoid the rainbow palette problem (e.g., Crameri et al., 2020).Another option is 3D blocks.In this case, although three dimensions can be visualized, this can only be done from a given perspective.This can sometimes result in data that is not visible or only partially visible.
To avoid the above limitation, it is necessary to display data with one more dimension.Currently, there are two options to do this: (a) The use of motion picture formats (ideal for time-dependent distributions) or (b) The use of Universal 3D file formats (which include the three spatial dimensions).Neither option is available in print format.Some examples of studies would be that of earthquakes and their interrelation as in earthquake swarms.Other examples could be the study of atmospheric sciences (such as temperature) and ocean currents.

Conclusions
It is essential to make it simple to generate temporal variations in models or data that require animations or movies.Historically, creating animation has been a guru-level undertaking where expert programmers produce grids or columns that vary with time and whose changes are represented by variable geometry or colorization.However, we cannot only let this ability depend on guru experts.Or was an even more difficult or expensive for the non-experts who managed to produce animations through laborious post-production processes, and third party (often proprietary) software or services.We have added movie-making modules to the GMT to make it simple for any GMT user to make animations, that is, we desired animations for the masses.Our paper gives an overview of how this can be done and shows many examples (from simple to advanced) to illustrate GMT's capability to make movies.Since most scientific journals now read in a browser, their tablets, or even phones, there are no technical limitations that would prevent illustrations from being animations.We hope our presentation will encourage scientists to routinely create animations when discussing temporal or spatial changes.

Figure 2 .
Figure 2. The six types of movie progress indicators.All have default sizes, placements, colors, and pens (shown), but these can be overridden by the corresponding modifiers to the movie -P option.The linear indicators may only be placed along the side of the canvas while the circular indicators can go in any of the nine reference locations.

Figure 3 .
Figure3.The complete animation consists of the required animation section, prepended by an optional title sequence.The title sequence can be generated by a script or given as a PostScript illustration; see movie -E.The fade-levels (0 means black, 100 means normal visibility) can be imposed on the title (-E) as well as the animation (-K), with many modifiers controlling the effects.

Figure 4 .
Figure 4. (a) Evolution of one symbol's size-variation as a function of time given the time-knots from -Es and the magnifications from -Ms.Here we temporarily magnify the symbol size five times before decaying to the intended size and eventually shrink it further down to a small size during the fade and coda phases.(b) Evolution of one symbol's color intensity as a function of time given the time-knots from -Es and the intensities from -Mi.Here we seek to whiten the symbol during the event arrival, as well as darken it during a permanent coda phase.(c) A symbol may go from being invisible to reaching full opaqueness at the event's beginning time, finally fading to a near-invisible stage after reaching its full duration.(e) A symbol may go from a constant color to changing colors at the event's beginning time, finally fading to a different-colored stage after reaching its duration.This curve is scaled by the amplitude [1] and added to the z-data before CPT-lookup occurs.(e) A label (with or without an accompanying symbol) may go from being invisible to reaching full opaqueness at the event begin time, staying visible for the given duration, and then finally fade away completely.For labels, the plateau and decay periods do not apply.

Video 2 .
cat << 'EOF' > pre.sh # Dr. Jones stopover cities cat <<-'FILE' > cities.txt -74Moon spinning.Basic spinning sphere showing the topographic relief of the Moon at 6 min resolution.To view this video in the full-text HTML version of this article, please visit https://onlinelibrary.wiley.com/doi/10.1029/2024GC011545.Video 1. Two events with the same duration are plotted.The green circle reflects the default adjustment curves while the red follows the more elaborate scaling with a rise, plateau, decay, and fading to coda.The labels follow the behavior of the symbols.Red triangle on the time axis indicates present time (movie-Pf) while small red and green circles show variation in symbol size for the two events.To view this video in the full-text HTML version of this article, please visit https://onlinelibrary.wiley.com/doi/10.1029/2024GC011545.

Video 4 .
Complex Indiana Jones map animation.Same as Video 3, but including a title sequence, audio, and the names of the cities.To view this video in the full-text HTML version of this article, please visit https:// onlinelibrary.wiley.com/doi/10.1029/2024GC011545.

Video 5 .
Messi's goals animation.Location and amount of goals from 2003 until 2023.To view this video in the full-text HTML version of this article, please visit https://onlinelibrary.wiley.com/doi/10.1029/2024GC011545.

Table 1
Font and Format Used When Referencing Parameters, Options, and Modules

Table 2
List of Constant, Variable, and Derived Movie Parameters

Table 3
First Records of the Distance_vs_Frame.txtFile Simple Indiana Jones map animation.Dr. Jones' flight from New York to Venice, as seen in the "Last Crusade" film.To view this video in the full-text HTML version of this article, please visit https://onlinelibrary. wiley.com/doi/10.1029/2024GC011545.

Table 4
Some Records of Input File Messi_Goals.txtWith Date, Coordinates of the Stadium and Amount of Goals Scored in Each Game

Table 5
Some Records of the Processed Input Table