Sophie

Sophie

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

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>7.10 A geographical bar graph plot</TITLE>
<META NAME="description" CONTENT="7.10 A geographical bar graph plot">
<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="node132.html">
<LINK REL="previous" HREF="node130.html">
<LINK REL="up" HREF="node121.html">
<LINK REL="next" HREF="node132.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html4490"
  HREF="node132.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html4484"
  HREF="node121.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html4478"
  HREF="node130.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html4486"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html4488"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html4491"
  HREF="node132.html">7.11 Making a 3-D</A>
<B> Up:</B> <A NAME="tex2html4485"
  HREF="node121.html">7. Creating GMT Graphics</A>
<B> Previous:</B> <A NAME="tex2html4479"
  HREF="node130.html">7.9 Plotting time-series along</A>
 &nbsp; <B>  <A NAME="tex2html4487"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html4489"
  HREF="node256.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0015100000000000000000"></A>
<A NAME="24424"></A>
<BR>
7.10 A geographical bar graph plot
</H1>

<P>
Our next and perhaps most business-like example presents a
three-dimensional bar graph plot showing the geographic
distribution of the membership in the American Geophysical
Union (AGU).  The input data was taken from the January 2008 AGU
member directory and added up to give total members per
continent.  We decide to plot a 3-D column centered on
each continent with a height that is proportional to the
logarithm of the membership.  A log<IMG
 WIDTH="17" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
 SRC="img2.png"
 ALT="$_{10}$">-scale is
used since the memberships vary by almost 3 orders of
magnitude.  We choose a plain linear projection for the
basemap and add the columns and text on top. Our script that produces Figure&nbsp;<A HREF="#fig:GMT_example_10">7.10</A> reads:

<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>#!/bin/sh
#               GMT EXAMPLE 10
#
# Purpose:      Make 3-D bar graph on top of perspective map
# GMT progs:    pscoast, pstext, psxyz
# Unix progs:   $AWK, rm
#
ps=example_10.ps
pscoast -Rd -JX8id/5id -Dc -Gblack -E200/40 -K -U"Example 10 in Cookbook" &gt; $ps
psxyz agu2008.d -R-180/180/-90/90/1/100000 -J -JZ2.5il -So0.3ib1 -Ggray -Wthinner \
        -B60g60/30g30/a1p:Memberships:WSneZ -O -K -E200/40 &gt;&gt; $ps
$AWK '{print $1, $2, 20, 0, 0, "RM", $3}' agu2008.d \
        | pstext -Rd -J -O -K -E200/40 -Gwhite -Sthinner -D-0.2i/0 &gt;&gt; $ps
echo "4.5 6 30 0 5 BC AGU 2008 Membership Distribution" | pstext -R0/11/0/8.5 -Jx1i -O &gt;&gt; $ps
rm -f .gmt*
</PRE>
<BR CLEAR="ALL">
<HR>
<DIV ALIGN="CENTER"><A NAME="fig:GMT_example_10"></A><A NAME="25094"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 7.10:</STRONG>
Geographical bar graph.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
  WIDTH="503" HEIGHT="325" ALIGN="BOTTOM" BORDER="0"
 SRC="./example_10.png"
 ALT="Image example_10"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
<A NAME="24430"></A>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html4490"
  HREF="node132.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html4484"
  HREF="node121.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html4478"
  HREF="node130.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html4486"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html4488"
  HREF="node256.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html4491"
  HREF="node132.html">7.11 Making a 3-D</A>
<B> Up:</B> <A NAME="tex2html4485"
  HREF="node121.html">7. Creating GMT Graphics</A>
<B> Previous:</B> <A NAME="tex2html4479"
  HREF="node130.html">7.9 Plotting time-series along</A>
 &nbsp; <B>  <A NAME="tex2html4487"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html4489"
  HREF="node256.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-07-14
</ADDRESS>
</BODY>
</HTML>