Sophie

Sophie

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

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>4.1 Cpt files</TITLE>
<META NAME="description" CONTENT="4.1 Cpt files">
<META NAME="keywords" CONTENT="GMT_Tutorial">
<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_Tutorial.css">

<LINK REL="next" HREF="node52.html">
<LINK REL="previous" HREF="node49.html">
<LINK REL="up" HREF="node49.html">
<LINK REL="next" HREF="node51.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html1111"
  HREF="node51.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1105"
  HREF="node49.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1099"
  HREF="node49.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1107"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1109"
  HREF="node63.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1112"
  HREF="node51.html">4.1.1 Exercises</A>
<B> Up:</B> <A NAME="tex2html1106"
  HREF="node49.html">4. SESSION FOUR</A>
<B> Previous:</B> <A NAME="tex2html1100"
  HREF="node49.html">4. SESSION FOUR</A>
 &nbsp; <B>  <A NAME="tex2html1108"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1110"
  HREF="node63.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION00610000000000000000"></A>
<A NAME="1281"></A>
<BR>
4.1 Cpt files
</H1>

<P>
The cpt file is discussed in detail in the <A NAME="tex2html208"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> Technical Reference
and Cookbook, Chapter 4.  Please review the format before experimenting
further.

<P>
Cpt files can be created in any number of ways.  <A NAME="tex2html209"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> provides
two mechanisms: 
<P>

<OL>
<LI>Create simple, linear color tables given a master color table
(several are built-in) and the desired <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img17.png"
 ALT="$z$">-values at color boundaries
(<A NAME="tex2html210"
  HREF="../man/makecpt.html"><I><B>makecpt</B></I></A><A NAME="2472"></A>)

<P>
</LI>
<LI>Create color tables based on a master cpt color table and the
histogram-equalized distribution of <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img17.png"
 ALT="$z$">-values in a gridded data file (<A NAME="tex2html211"
  HREF="../man/grd2cpt.html"><I><B>grd2cpt</B></I></A><A NAME="2477"></A>)

<P>
</LI>
</OL>

<P>
One can also make these files manually or with <I>awk</I><A NAME="2481"></A>
or other tools.  Here we will limit our discussion to <A NAME="tex2html212"
  HREF="../man/makecpt.html"><I><B>makecpt</B></I></A><A NAME="2485"></A>.
Its main argument is the name of the master color table (a list is
shown if you run the program with no arguments) and the equidistant
<IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img17.png"
 ALT="$z$">-values to go with it.  The main options are given below.

<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1622"></A>
<TABLE>
<CAPTION><STRONG>Table 4.1:</STRONG>
Prime options available in <A NAME="tex2html202"
  HREF="../man/makecpt.html"><I><B>makecpt</B></I></A><A NAME="2494"></A>.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1">
<I>Option</I></FONT></TD>
<TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1"> <I>Purpose</I></FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">   
<B>-C</B> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Set the name of the master cpt file to use </FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">  
<B>-I</B> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Reverse the sense of the color progression </FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">  
<B>-V</B> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Run in verbose mode </FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">  
<B>-Z</B> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Make a continuous rather than discrete table </FONT></TD>
</TR>
</TABLE><FONT SIZE="-1">

<A NAME="tbl:makecpt"></A></FONT></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
To make discrete and continuous color cpt files for data that ranges
from -20 to 60, with color changes at every 10, try these two variants:

<P>
<PRE>
makecpt -Crainbow -T-20/60/10 &gt; disc.cpt
makecpt -Crainbow -T-20/60/10 -Z &gt; cont.cpt
</PRE>

<P>
We can plot these color tables with <A NAME="tex2html213"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="2499"></A>; the options
worth mentioning here are listed in Table&nbsp;<A HREF="#tbl:psscale">4.2</A>.
In addition, the <B>-B</B> option can be used to set the title
and unit label (and optionally to set the annotation-, tick-,
and grid-line intervals for the colorbars.)

<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="1626"></A>
<TABLE>
<CAPTION><STRONG>Table 4.2:</STRONG>
The main switches and options in <A NAME="tex2html205"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="2508"></A>.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1">
<I>Option</I></FONT></TD>
<TD ALIGN="CENTER" COLSPAN=1><FONT SIZE="-1"> <I>Purpose</I></FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">   
<B>-C</B></FONT><FONT SIZE="-1"><I>cptfile</I> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> The required cpt file </FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">  
<B>-D</B></FONT><FONT SIZE="-1"><I>xpos</I>/</FONT><FONT SIZE="-1"><I>ypos</I>/</FONT><FONT SIZE="-1"><I>length</I>/</FONT><FONT SIZE="-1"><I>width</I>[</FONT><FONT SIZE="-1"><B>h</B>] </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Sets the position of the center/left and dimensions of scale bar. </FONT></TD>
</TR>
<TR><TD ALIGN="LEFT"><FONT SIZE="-1">  
        </FONT></TD>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Append </FONT><FONT SIZE="-1"><B>h</B> to get horizontal bar and give center/top instead </FONT></TD>
</TR>
<TR><TH ALIGN="LEFT"><FONT SIZE="-1">  
<B>-I</B></FONT><FONT SIZE="-1"><I>max_intensity</I> </FONT></TH>
<TD ALIGN="LEFT"><FONT SIZE="-1"> Add illumination effects </FONT></TD>
</TR>
</TABLE><FONT SIZE="-1">

<A NAME="tbl:psscale"></A></FONT></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
<PRE>
psbasemap -R0/8.5/0/11 -Jx1i -P -B0 -K &gt; bar.ps
psscale -D3i/3i/4i/0.5ih -Cdisc.cpt -B:discrete: -O -K &gt;&gt; bar.ps
psscale -D3i/5i/4i/0.5ih -Ccont.cpt -B:continuous: -O -K &gt;&gt; bar.ps
psscale -D3i/7i/4i/0.5ih -Cdisc.cpt -B:discrete: -I0.5 -O -K &gt;&gt; bar.ps
psscale -D3i/9i/4i/0.5ih -Ccont.cpt -B:continuous: -I0.5 -O &gt;&gt; bar.ps
</PRE>

<P>
<BR><HR>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html1113"
  HREF="node51.html">4.1.1 Exercises</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1111"
  HREF="node51.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1105"
  HREF="node49.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1099"
  HREF="node49.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1107"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1109"
  HREF="node63.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1112"
  HREF="node51.html">4.1.1 Exercises</A>
<B> Up:</B> <A NAME="tex2html1106"
  HREF="node49.html">4. SESSION FOUR</A>
<B> Previous:</B> <A NAME="tex2html1100"
  HREF="node49.html">4. SESSION FOUR</A>
 &nbsp; <B>  <A NAME="tex2html1108"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1110"
  HREF="node63.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>