Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 5764c67416561ab82b35afcf9c650e17 > files > 687

GMT-doc-4.5.2-1.fc13.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>O.4.3 Using a different data set for labels</TITLE>
<META NAME="description" CONTENT="O.4.3 Using a different data set for labels">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="previous" HREF="node249.html">
<LINK REL="up" HREF="node247.html">
<LINK REL="next" HREF="node251.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html6198"
  HREF="node251.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html6192"
  HREF="node247.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html6188"
  HREF="node249.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html6194"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html6196"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html6199"
  HREF="node251.html">O.5 Putting it all</A>
<B> Up:</B> <A NAME="tex2html6193"
  HREF="node247.html">O.4 Examples of Label</A>
<B> Previous:</B> <A NAME="tex2html6189"
  HREF="node249.html">O.4.2 Label placement by</A>
 &nbsp; <B>  <A NAME="tex2html6195"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html6197"
  HREF="node255.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION003243000000000000000">
O.4.3 Using a different data set for labels</A>
</H2>

<P>
In the next example we will use the bathymetry values along the transect as
our label, with placement determined by the distance along track.  We choose
to place labels every 1500 km.  To do this we need to pull out those records
whose distances are multiples of 1500 km and create a ``fixed points'' file
that can be used to place labels and specify the labels.  This is done with
<I>awk</I><A NAME="32976"></A>.

<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>awk '{if (NR &gt; 1 &amp;&amp; ($3 % 1500) == 0) print $1, $2, int($5)}' transect.d &gt; fix2.d
pscoast -R50/160/-15/15 -JM5.3i -Glightgray -A500 -K -P &gt; GMT_App_O_8.ps
grdcontour geoid.grd -J -O -K -B20f10WSne -C10 -A20+d+um+s8 -Gl50/10S/160/10S -S10 \
        -T:-+ &gt;&gt; GMT_App_O_8.ps
psxy -R -J -O -Sqffix2.d:+g+an+p+Lf+um+s8 -Wthick transect.d &gt;&gt; GMT_App_O_8.ps
</PRE>
<BR CLEAR="ALL">
<HR>
<P>
The output is presented as Figure&nbsp;<A HREF="#fig:GMT_App_O_8">O.8</A>.

<P>

<DIV ALIGN="CENTER"><A NAME="fig:GMT_App_O_8"></A><A NAME="32981"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure O.8:</STRONG>
Labels based on another data set (here bathymetry) while
the placement is based on distances.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="653" HEIGHT="195" ALIGN="BOTTOM" BORDER="0"
 SRC="img304.png"
 ALT="\includegraphics{scripts/GMT_App_O_8}"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html6198"
  HREF="node251.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html6192"
  HREF="node247.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html6188"
  HREF="node249.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html6194"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html6196"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html6199"
  HREF="node251.html">O.5 Putting it all</A>
<B> Up:</B> <A NAME="tex2html6193"
  HREF="node247.html">O.4 Examples of Label</A>
<B> Previous:</B> <A NAME="tex2html6189"
  HREF="node249.html">O.4.2 Label placement by</A>
 &nbsp; <B>  <A NAME="tex2html6195"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html6197"
  HREF="node255.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>