Next: 6.11 Making a 3-D Up: 6. Cook-book Previous: 6.9 Plotting time-series along Contents Index

#
6.10 A geographical bar graph plot

Our next and perhaps silliest example presents a three-dimensional bargraph plot showing the geographic distribution of the membership in the American Geophysical Union (AGU). The input data was taken from the 1991 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-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 reads:

    pscoast -R-180/180/-90/90 -JX8i/5id -Dc -G0 -E200/40 -K -U"Example 10 in Cookbook" >! example_10.ps
    psxyz agu.d -R-180/180/-90/90/1/100000 -JX -JZ2.5il -So0.3ib1 -G140 -W0.5p -O -K -E200/40 \
       -B60g60/30g30/a1p:Memberships:WSneZ >> example_10.ps
    $AWK '{print $1-10, $2, 20, 0, 0, 7, $3}' agu.d | pstext -R-180/180/-90/90 -JX -O -K -E200/40 -G255 \
       -S0.5p >> example_10.ps
    echo "4.5 6 30 0 5 2 AGU 1991 Membership Distribution" | pstext -R0/11/0/8.5 -Jx1i -O \
       >> example_10.ps
    \rm -f .gmtcommands

with the result presented in Figure 6.10.

Figure 6.10: Geographical bar graph.

Next: 6.11 Making a 3-D Up: 6. Cook-book Previous: 6.9 Plotting time-series along Contents Index