<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>(9) Time-series along tracks — GMT 5.4.4 documentation</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> <link rel="stylesheet" href="../_static/rtd.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/searchtools.js"></script> <script type="text/javascript" src="../../_static/rtd-sidebar.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="(10) A geographical bar graph plot" href="ex10.html" /> <link rel="prev" title="(8) A 3-D histogram" href="ex08.html" /> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="ex10.html" title="(10) A geographical bar graph plot" accesskey="N">next</a> </li> <li class="right" > <a href="ex08.html" title="(8) A 3-D histogram" accesskey="P">previous</a> </li> <li><a href="/projects/gmt/wiki/Documentation">Project Home</a> »</li> <li class="nav-item nav-item-0"><a href="../index.html">GMT 5.4.4 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="../Gallery.html" accesskey="U">The GMT historical collection</a> »</li> <li class="right"> <form class="search" accept-charset="UTF-8" action="search.html" method="get"> <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div> <label for="q"> <a class="search" href="search.html" accesskey="s" original-title="">Search:</a> </label> <input accesskey="f" class="small" id="q" name="q" size="20" type="text"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form></li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="time-series-along-tracks"> <span id="example-09"></span><h1>(9) Time-series along tracks<a class="headerlink" href="#time-series-along-tracks" title="Permalink to this headline">¶</a></h1> <p>A common application in many scientific disciplines involves plotting one or several time-series as as "wiggles" along tracks. Marine geophysicists often display magnetic anomalies in this manner, and seismologists use the technique when plotting individual seismic traces. In our example we will show how a set of Geosat sea surface slope profiles from the south Pacific can be plotted as "wiggles" using the <a class="reference internal" href="../pswiggle.html"><span class="doc">pswiggle</span></a> program. We will embellish the plot with track numbers, the location of the Pacific-Antarctic Ridge, recognized fracture zones in the area, and a "wiggle" scale. The Geosat tracks are stored in the file <code class="docutils literal notranslate"><span class="pre">tracks.txt</span></code>, the ridge in <code class="docutils literal notranslate"><span class="pre">ridge.xy</span></code>, and all the fracture zones are stored in the multiple segment file <code class="docutils literal notranslate"><span class="pre">fz.xy</span></code>. The profile id is contained in the segment headers and we wish to use the last data point in each of the track segments to construct an input file for <a class="reference internal" href="../pstext.html"><span class="doc">pstext</span></a> that will label each profile with the track number. We know the profiles trend approximately N40E so we want the labels to have that same orientation (i.e., the angle with the baseline must be 50). We do this by extracting the last record from each track and select segment header as textstring when running the output through <a class="reference internal" href="../pstext.html"><span class="doc">pstext</span></a>. Note we offset the positions by -0.05 inch with <strong>-D</strong> in order to have a small gap between the profile and the label:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span> <span class="c1"># GMT EXAMPLE 09</span> <span class="c1">#</span> <span class="c1"># Purpose: Make wiggle plot along track from geoid deflections</span> <span class="c1"># GMT modules: gmtconvert, pswiggle, pstext, psxy</span> <span class="c1"># Unix progs: </span> <span class="c1">#</span> <span class="nv">ps</span><span class="o">=</span>example_09.ps gmt pswiggle tracks.txt -R185/250/-68/-42 -K -Jm0.13i -Ba10f5 -BWSne+g240/255/240 -G+red <span class="se">\</span> -G-blue -Z2000 -Wthinnest -S240/-67/500/@~m@~rad --FORMAT_GEO_MAP<span class="o">=</span>dddF > <span class="nv">$ps</span> gmt psxy -R -J -O -K ridge.xy -Wthicker >> <span class="nv">$ps</span> gmt psxy -R -J -O -K fz.xy -Wthinner,- >> <span class="nv">$ps</span> <span class="c1"># Take label from segment header and plot near coordinates of last record of each track</span> gmt convert -El tracks.txt <span class="p">|</span> gmt pstext -R -J -F+f10p,Helvetica-Bold+a50+jRM+h <span class="se">\</span> -D-0.05i/-0.05i -O >> <span class="nv">$ps</span> </pre></div> </div> <p>The output shows the sea-surface slopes along 42 descending Geosat tracks in the Eltanin and Udintsev fracture zone region in a Mercator projection.</p> <div class="figure align-center" id="id1"> <a class="reference internal image-reference" href="../_images/example_09.png"><img alt="../_images/example_09.png" src="../_images/example_09.png" style="width: 500px;" /></a> <p class="caption"><span class="caption-text">Time-series as wiggles along a track.</span></p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="ex08.html" title="previous chapter">(8) A 3-D histogram</a></p> <h4>Next topic</h4> <p class="topless"><a href="ex10.html" title="next chapter">(10) A geographical bar graph plot</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/gallery/ex09.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="ex10.html" title="(10) A geographical bar graph plot" >next</a> </li> <li class="right" > <a href="ex08.html" title="(8) A 3-D histogram" >previous</a> </li> <li><a href="/projects/gmt/wiki/Documentation">Project Home</a> »</li> <li class="nav-item nav-item-0"><a href="../index.html">GMT 5.4.4 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="../Gallery.html" >The GMT historical collection</a> »</li> <li class="right"> <form class="search" accept-charset="UTF-8" action="search.html" method="get"> <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div> <label for="q"> <a class="search" href="search.html" accesskey="s" original-title="">Search:</a> </label> <input accesskey="f" class="small" id="q" name="q" size="20" type="text"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form></li> </ul> </div> <div class="footer"> © Copyright 2018, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe. Last updated on Jun 28, 2018. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.7.5. <br />Theme based on <a href="http://readthedocs.org/">Read The Docs</a> </div> </body> </html>