Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 4b194777eaf705e440bb2ce282d32772 > files > 744

GMT-doc-4.5.3-3.fc14.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.15.2 Regular CPT files</TITLE>
<META NAME="description" CONTENT="4.15.2 Regular CPT files">
<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="node69.html">
<LINK REL="up" HREF="node68.html">
<LINK REL="next" HREF="node71.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html3540"
  HREF="node71.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3534"
  HREF="node68.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3530"
  HREF="node69.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3536"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3538"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3541"
  HREF="node71.html">4.16 Character escape sequences</A>
<B> Up:</B> <A NAME="tex2html3535"
  HREF="node68.html">4.15 Color palette tables</A>
<B> Previous:</B> <A NAME="tex2html3531"
  HREF="node69.html">4.15.1 Categorical CPT files</A>
 &nbsp; <B>  <A NAME="tex2html3537"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3539"
  HREF="node256.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION0012152000000000000000">
4.15.2 Regular CPT files</A>
</H2>

<P>
Here, the colors may be specified either in the RGB- (red, green, blue), CMYK- (cyan,
magenta, yellow, black), or in the HSV-system (hue, saturation, value, and
here the comment # COLOR_MODEL = HSV must be present in the cpt file since there
are no other way to distinguish between HSV and RGB).  Color names can also be used.
Using the RGB system<A NAME="tex2html1182"
  HREF="footnode.html#foot18313"><SUP>4.12</SUP></A>,
the format of the cpt-file is: 

<P>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT">z<IMG
 WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img70.png"
 ALT="$_0$"></TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">z<IMG
 WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img27.png"
 ALT="$_1$"></TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">[<B>A</B>]</TD>
<TD ALIGN="LEFT">[;<I>label</I>]</TD>
</TR>
<TR><TD ALIGN="LEFT">...</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
</TR>
<TR><TD ALIGN="LEFT">z<IMG
 WIDTH="26" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img73.png"
 ALT="$_{n-2}$"></TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"></TD>
<TD ALIGN="LEFT">z<IMG
 WIDTH="26" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img74.png"
 ALT="$_{n-1}$"></TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$"></TD>
<TD ALIGN="LEFT">[<B>A</B>]</TD>
<TD ALIGN="LEFT">[;<I>label</I>]</TD>
</TR>
</TABLE>
</DIV>

<P>
Thus, for each ``<I>z</I>-slice'', defined as the interval between two boundaries
(e.g., <I>z<IMG
 WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img70.png"
 ALT="$_0$"></I> to <I>z<IMG
 WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img27.png"
 ALT="$_1$"></I>), the color can be constant (by letting R<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$">
= R<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$">, G<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"> = G<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$">, and B<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img71.png"
 ALT="$_{min}$"> = B<IMG
 WIDTH="25" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img72.png"
 ALT="$_{max}$">) or a continuous,
linear function of <I>z</I>.  The optional flag <B>A</B> is used to indicate annotation
of the color scale when plotted using <A NAME="tex2html1183"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="19456"></A>.  The optional code <B>A</B> may be <B>L</B>,
<B>U</B>, or <B>B</B> to select annotation of the lower, upper, or both limits
of the particular <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img20.png"
 ALT="$z$">-slice.  However, the standard <B>-B</B> option can be used
by <A NAME="tex2html1184"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="19462"></A> to affect annotation and ticking of color scales.  The optional
semicolon followed by a text label will make <A NAME="tex2html1185"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="19467"></A>, when used with the <B>-L</B> option,
place the supplied label instead of formatted <I>z</I>-values.

<P>
As for categorical tables, the background color (for <I>z</I>-values <IMG
 WIDTH="16" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$&lt;$"> <I>z<IMG
 WIDTH="11" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img70.png"
 ALT="$_0$"></I>), foreground color
(for <I>z</I>-values <IMG
 WIDTH="16" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img13.png"
 ALT="$&gt;$"> <I>z<IMG
 WIDTH="26" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img74.png"
 ALT="$_{n-1}$"></I>), and not-a-number (NaN) color (for
<I>z</I>-values = NaN) are all defined in the <U>.gmtdefaults4</U>
file, but can be overridden by the statements

<P>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT">B</TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img67.png"
 ALT="$_{back}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img67.png"
 ALT="$_{back}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img67.png"
 ALT="$_{back}$"></TD>
</TR>
<TR><TD ALIGN="LEFT">F</TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img68.png"
 ALT="$_{fore}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img68.png"
 ALT="$_{fore}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="27" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img68.png"
 ALT="$_{fore}$"></TD>
</TR>
<TR><TD ALIGN="LEFT">N</TD>
<TD ALIGN="LEFT">R<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img69.png"
 ALT="$_{nan}$"></TD>
<TD ALIGN="LEFT">G<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img69.png"
 ALT="$_{nan}$"></TD>
<TD ALIGN="LEFT">B<IMG
 WIDTH="23" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img69.png"
 ALT="$_{nan}$"></TD>
</TR>
</TABLE>
</DIV>

<P>
which can be inserted into the beginning or end of the cpt-file.  If
you prefer the HSV system, set the
<U>.gmtdefaults4</U> parameter accordingly and replace red, green,
blue with hue, saturation, value.  Color palette tables that contain
grayshades only may replace the <I>r/g/b</I> triplets with a single grayshade
in the 0-255 range.  For CMYK, give four values in the 0-100 range.
Both the min and max color specifications in one <I>z</I>-slice must use
the same color system, i.e., you cannot mix ``red'' and 0/255/100 on the
same line.

<P>
A few programs (i.e., those that plot polygons such as <A NAME="tex2html1186"
  HREF="../man/grdview.html"><I><B>grdview</B></I></A><A NAME="19475"></A>,
<A NAME="tex2html1187"
  HREF="../man/psscale.html"><I><B>psscale</B></I></A><A NAME="19480"></A>, and <A NAME="tex2html1188"
  HREF="../man/psxy.html"><I><B>psxy</B></I></A><A NAME="19485"></A>) can accept pattern fills instead
of grayshades.  You must specify the pattern as in Section&nbsp;<A HREF="node67.html#sec:fill">4.14</A> (no
leading <B>-G</B> of course), and only the first (low <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img20.png"
 ALT="$z$">) is used (we cannot
interpolate between patterns).  
Finally, some programs let you skip features
whose <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img20.png"
 ALT="$z$">-slice in the cptfile has grayshades set to -.  As an example,
consider

<P>
<DIV ALIGN="CENTER">
<TABLE CELLPADDING=3>
<TR><TD ALIGN="LEFT">30</TD>
<TD ALIGN="LEFT">p200/16</TD>
<TD ALIGN="LEFT">80</TD>
<TD ALIGN="LEFT">-</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
</TR>
<TR><TD ALIGN="LEFT">80</TD>
<TD ALIGN="LEFT">-</TD>
<TD ALIGN="LEFT">100</TD>
<TD ALIGN="LEFT">-</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
</TR>
<TR><TD ALIGN="LEFT">100</TD>
<TD ALIGN="LEFT">200</TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT">200</TD>
<TD ALIGN="LEFT">255</TD>
<TD ALIGN="LEFT">255</TD>
<TD ALIGN="LEFT">0</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
</TR>
<TR><TD ALIGN="LEFT">200</TD>
<TD ALIGN="LEFT">yellow</TD>
<TD ALIGN="LEFT">300</TD>
<TD ALIGN="LEFT">green</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
<TD ALIGN="LEFT">&nbsp;</TD>
</TR>
</TABLE>
</DIV>
where slice <IMG
 WIDTH="81" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img75.png"
 ALT="$30 &lt; z &lt; 80$"> is painted with pattern # 16 at 200 dpi,
slice <IMG
 WIDTH="89" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img76.png"
 ALT="$80 &lt; z &lt; 100$"> is skipped, slice <IMG
 WIDTH="97" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img77.png"
 ALT="$100 &lt; z &lt; 200$"> is
painted in a range of dark red to yellow, whereas the slice <IMG
 WIDTH="97" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img78.png"
 ALT="$200 &lt; z &lt; 300$">
will linearly yield colors from yellow to green, depending on the actual value
of <IMG
 WIDTH="10" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img20.png"
 ALT="$z$">.

<P>
<A NAME="18391"></A>
<A NAME="18392"></A>

<P>
<A NAME="18393"></A>
<A NAME="18394"></A>
<A NAME="18395"></A>
<A NAME="18396"></A>

<P>
Some programs like <A NAME="tex2html1189"
  HREF="../man/grdimage.html"><I><B>grdimage</B></I></A><A NAME="19491"></A> and <A NAME="tex2html1190"
  HREF="../man/grdview.html"><I><B>grdview</B></I></A><A NAME="19496"></A> apply artificial
illumination to achieve shaded relief maps.  This is typically done
by finding the directional gradient in the direction of the artificial
light source and scaling the gradients to have approximately a normal
distribution on the interval [-1,+1].  These intensities are used
to add ``white'' or ``black'' to the color as defined by the <I>z</I>-values
and the cpt-file.  An intensity of zero leaves the color unchanged.
Higher values will brighten the color, lower values will darken it,
all without changing the original hue of the color (see Appendix&nbsp;<A HREF="node208.html#app:I">I</A>
for more details).  The illumination is decoupled from the data
grid file in that a separate grid file holding intensities in the
[-1,+1] range must be provided.  Such intensity files can be
derived from the data grid using <A NAME="tex2html1191"
  HREF="../man/grdgradient.html"><I><B>grdgradient</B></I></A><A NAME="19501"></A> and modified
with <A NAME="tex2html1192"
  HREF="../man/grdhisteq.html"><I><B>grdhisteq</B></I></A><A NAME="19506"></A>, but could equally well be a separate data set.
E.g., some side-scan sonar systems collect both bathymetry and
backscatter intensities, and one may want to use the latter information
to specify the illumination of the colors defined by the former.
Similarly, one could portray magnetic anomalies superimposed on
topography by using the former for colors and the latter for shading. 

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html3540"
  HREF="node71.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3534"
  HREF="node68.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3530"
  HREF="node69.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3536"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3538"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3541"
  HREF="node71.html">4.16 Character escape sequences</A>
<B> Up:</B> <A NAME="tex2html3535"
  HREF="node68.html">4.15 Color palette tables</A>
<B> Previous:</B> <A NAME="tex2html3531"
  HREF="node69.html">4.15.1 Categorical CPT files</A>
 &nbsp; <B>  <A NAME="tex2html3537"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3539"
  HREF="node256.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-07-14
</ADDRESS>
</BODY>
</HTML>