Sophie

Sophie

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

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>7.19 Color patterns on maps</TITLE>
<META NAME="description" CONTENT="7.19 Color patterns on maps">
<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="next" HREF="node140.html">
<LINK REL="previous" HREF="node138.html">
<LINK REL="up" HREF="node120.html">
<LINK REL="next" HREF="node140.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html4568"
  HREF="node140.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html4562"
  HREF="node120.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html4556"
  HREF="node138.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html4564"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html4566"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html4569"
  HREF="node140.html">7.20 Custom plot symbols</A>
<B> Up:</B> <A NAME="tex2html4563"
  HREF="node120.html">7. Creating GMT Graphics</A>
<B> Previous:</B> <A NAME="tex2html4557"
  HREF="node138.html">7.18 Volumes and Spatial</A>
 &nbsp; <B>  <A NAME="tex2html4565"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html4567"
  HREF="node255.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0015190000000000000000"></A>
<A NAME="23976"></A>
<A NAME="23977"></A>
<BR>
7.19 Color patterns on maps
</H1>

<P>
<A NAME="tex2html1416"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> 3.1 introduced color patterns and this examples give
a few cases of how to use this new feature.  We make a phony
poster that advertises an international conference on <A NAME="tex2html1417"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> in Honolulu.  We use <A NAME="tex2html1418"
  HREF="../man/grdmath.html"><I><B>grdmath</B></I></A><A NAME="24843"></A>, <A NAME="tex2html1419"
  HREF="../man/makecpt.html"><I><B>makecpt</B></I></A><A NAME="24848"></A>, and
<A NAME="tex2html1420"
  HREF="../man/grdimage.html"><I><B>grdimage</B></I></A><A NAME="24853"></A> to draw pleasing color backgrounds on maps,
and overlay <A NAME="tex2html1421"
  HREF="../man/pscoast.html"><I><B>pscoast</B></I></A><A NAME="24858"></A> clip paths to have the patterns
change at the coastlines.  The middle panel demonstrates a
simple <A NAME="tex2html1422"
  HREF="../man/pscoast.html"><I><B>pscoast</B></I></A><A NAME="24863"></A> call where the built-in pattern # 86
is drawn at 100 dpi but with the black and white pixels
replaced with color combinations. At the same time the ocean is filled with a repeating
image of a circuit board (provides in Sun raster format).
The text <A NAME="tex2html1423"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> in the center is an off-line <I>PostScript</I> file that was overlaid using <A NAME="tex2html1424"
  HREF="../man/psimage.html"><I><B>psimage</B></I></A><A NAME="24872"></A>.
The final panel repeats the top panel except that the land and sea images have changed places
(Figure&nbsp;<A HREF="#fig:GMT_example_19">7.19</A>).

<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>#!/bin/sh
#               GMT EXAMPLE 19
#
# Purpose:      Illustrates various color pattern effects for maps
# GMT progs:    gmtset, grdimage, grdmath, makecpt, pscoast, pstext, psimage
# Unix progs:   rm
#
ps=example_19.ps

# First make a worldmap with graded blue oceans and rainbow continents

gmtset COLOR_MODEL rgb
grdmath -Rd -I1 Y COSD 2 POW = lat.grd
grdmath -Rd -I1 X Y ABS 90 NEQ MUL = lon.grd
echo "0 white 1 blue" &gt; lat.cpt
makecpt -Crainbow -T-180/180/60 -Z &gt; lon.cpt
grdimage lat.grd -Sl -JI0/6.5i -Clat.cpt -P -K -Y7.5i -B0 &gt; $ps
pscoast -R -J -O -K -Dc -A5000 -Gc &gt;&gt; $ps
grdimage lon.grd -Sl -J -Clon.cpt -O -K &gt;&gt; $ps
pscoast -R -J -O -K -Q &gt;&gt; $ps
pscoast -R -J -O -K -Dc -A5000 -Wthinnest &gt;&gt; $ps
echo "0 20 32 0 1 CM 8TH INTERNATIONAL" | pstext -R -J -O -K -Gred -Sthinner &gt;&gt; $ps
echo "0 -10 32 0 1 CM GMT CONFERENCE" | pstext -R -J -O -K -Gred -Sthinner &gt;&gt; $ps
echo "0 -30 18 0 1 CM Honolulu, Hawaii, April 1, 2010" | pstext -R -J -O -K -Ggreen -Sthinnest &gt;&gt; $ps

# Then show example of color patterns and placing a PostScript image

pscoast -R -J -O -K -Dc -A5000 -Gp100/86:FredByellow -Sp100/circuit.ras -B0 -Y-3.25i &gt;&gt; $ps
echo "0 30 32 0 1 CM SILLY USES OF" | pstext -R -J -O -K -Glightgreen -Sthinner &gt;&gt; $ps
echo "0 -30 32 0 1 CM COLOR PATTERNS" | pstext -R -J -O -K -Gmagenta -Sthinner &gt;&gt; $ps
psimage -C3.25i/1.625i/CM -W3i GMT_covertext.eps -O -K &gt;&gt; $ps

# Finally repeat 1st plot but exchange the patterns

grdimage lon.grd -Sl -J -Clon.cpt -O -K -Y-3.25i -B0 -U"Example 19 in Cookbook" &gt;&gt; $ps
pscoast -R -J -O -K -Dc -A5000 -Gc &gt;&gt; $ps
grdimage lat.grd -Sl -J -Clat.cpt -O -K &gt;&gt; $ps
pscoast -R -J -O -K -Q &gt;&gt; $ps
pscoast -R -J -O -K -Dc -A5000 -Wthinnest &gt;&gt; $ps
echo "0 20 32 0 1 CM 8TH INTERNATIONAL" | pstext -R -J -O -K -Gred -Sthinner &gt;&gt; $ps
echo "0 -10 32 0 1 CM GMT CONFERENCE" | pstext -R -J -O -K -Gred -Sthinner &gt;&gt; $ps
echo "0 -30 18 0 1 CM Honolulu, Hawaii, April 1, 2010" | pstext -R -J -O -Ggreen -Sthinnest &gt;&gt; $ps

rm -f l*.grd l*.cpt .gmt*
</PRE>
<BR CLEAR="ALL">
<HR>
<DIV ALIGN="CENTER"><A NAME="fig:GMT_example_19"></A><A NAME="24878"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 7.19:</STRONG>
Using color patterns and additional PostScript material in illustrations.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="383" HEIGHT="573" ALIGN="BOTTOM" BORDER="0"
 SRC="img180.png"
 ALT="\includegraphics[width=0.9\textwidth]{scripts/example_19}"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
<A NAME="23988"></A>
<A NAME="23989"></A>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html4568"
  HREF="node140.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html4562"
  HREF="node120.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html4556"
  HREF="node138.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html4564"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html4566"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html4569"
  HREF="node140.html">7.20 Custom plot symbols</A>
<B> Up:</B> <A NAME="tex2html4563"
  HREF="node120.html">7. Creating GMT Graphics</A>
<B> Previous:</B> <A NAME="tex2html4557"
  HREF="node138.html">7.18 Volumes and Spatial</A>
 &nbsp; <B>  <A NAME="tex2html4565"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html4567"
  HREF="node255.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>