This file is indexed.

/usr/share/doc/gmt/html/GMT_Tutorial.html is in gmt-doc 4.5.11-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
<?xml version="1.0" encoding="iso-8859-1" ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" > 
<html xmlns="http://www.w3.org/1999/xhtml"  
> 
<head>
   <title></title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> 
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" /> 
<!-- xhtml,mathml,fn-in,html --> 
<meta name="src" content="GMT_Tutorial.tex" /> 
<meta name="date" content="2013-11-05 09:51:00" /> 
<link rel="stylesheet" type="text/css" href="GMT_Tutorial.css" /> 
</head><body 
>
<div class="center" 
>
<!--l. 12--><p class="noindent" >
</p><!--l. 14--><p class="noindent" ><span 
class="ptmb8t-x-x-207">The Generic Mapping Tools</span>

</p><!--l. 17--><p class="noindent" ><img 
src="images/GMT_covertext.png" alt="PIC"  
 />
</p><!--l. 20--><p class="noindent" ><span 
class="ptmb8t-x-x-248">Version 4.5.11</span>
</p><!--l. 24--><p class="noindent" ><span 
class="ptmb8t-x-x-207">A Map-making Tutorial</span>
</p><!--l. 28--><p class="noindent" ><span 
class="ptmb8t-x-x-120">by</span>
</p><!--l. 32--><p class="noindent" ><span 
class="ptmb8t-x-x-207">Pål (Paul) Wessel</span>
</p><!--l. 36--><p class="noindent" ><span 
class="ptmb8t-x-x-144">School of Ocean and Earth Science and Technology</span>
</p><!--l. 37--><p class="noindent" ><span 
class="ptmb8t-x-x-144">University of Hawai&#8217;i at M</span><span 
class="ptmb8t-x-x-144">&#x0101;</span><span 
class="ptmb8t-x-x-144">noa</span>
</p><!--l. 41--><p class="noindent" ><span 
class="ptmb8t-x-x-120">and</span>
</p><!--l. 45--><p class="noindent" ><span 
class="ptmb8t-x-x-207">Walter H. F. Smith</span>
</p><!--l. 49--><p class="noindent" ><span 
class="ptmb8t-x-x-144">Laboratory for Satellite Altimetry</span>
</p><!--l. 50--><p class="noindent" ><span 
class="ptmb8t-x-x-144">NOAA/NESDIS</span>
</p><!--l. 54--><p class="noindent" ><span 
class="ptmb8t-x-x-120">November 2013</span>

</p><!--l. 57--><p class="noindent" ><img 
src="images/GMT_coverlogo.png" alt="PIC"  
 /></p></div>
<a 
 id="Q1-1-1"></a>
                                                                                 

                                                                                 
                                                                                 

                                                                                 
   <h2 class="likechapterHead"><a 
 id="x1-1000"></a>Contents</h2> <div class="tableofcontents">
   <span class="chapterToc" > <a 
href="#Q1-1-1">Front page</a></span>
<br />   <span class="chapterToc" > <a 
href="#Q1-1-4">INTRODUCTION</a></span>
<br />   &#x00A0;<span class="sectionToc" ><a 
href="#Q1-1-6"><span 
class="ptmb8t-">GMT</span>&#x00A0;overview: History, philosophy, and usage</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" ><a 
href="#Q1-1-8">Historical highlights</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" ><a 
href="#Q1-1-10">Philosophy</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" ><a 
href="#Q1-1-12">Why is <span 
class="ptmb8t-">GMT</span>&#x00A0;so popular?</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" ><a 
href="#Q1-1-14"><span 
class="ptmb8t-">GMT</span>&#x00A0;installation considerations</a></span>
<br />   <span class="chapterToc" >1 <a 
href="#x1-80001" id="QQ2-1-15">SESSION ONE</a></span>
<br />   &#x00A0;<span class="sectionToc" >1.1 <a 
href="#x1-90001.1" id="QQ2-1-16">Tutorial setup</a></span>
<br />   &#x00A0;<span class="sectionToc" >1.2 <a 
href="#x1-100001.2" id="QQ2-1-17">The <span 
class="ptmb8t-">GMT</span> environment: What happens when you run <span 
class="ptmb8t-">GMT</span>?</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.2.1 <a 
href="#x1-110001.2.1" id="QQ2-1-19">Input data</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.2.2 <a 
href="#x1-120001.2.2" id="QQ2-1-20">Job Control</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.2.3 <a 
href="#x1-130001.2.3" id="QQ2-1-21">Output data</a></span>
<br />   &#x00A0;<span class="sectionToc" >1.3 <a 
href="#x1-140001.3" id="QQ2-1-22">The UNIX Environment: Entry Level Knowledge</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.3.1 <a 
href="#x1-150001.3.1" id="QQ2-1-23">Redirection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.3.2                                                                                                      <a 
href="#x1-160001.3.2" id="QQ2-1-24">Piping
(<!--l. 25--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math>)</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.3.3 <a 
href="#x1-170001.3.3" id="QQ2-1-25">Standard error (<span 
class="ptmri8t-">stderr</span>)</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.3.4 <a 
href="#x1-180001.3.4" id="QQ2-1-26">File name expansion or &#8220;wild cards&#8221;</a></span>
<br />   &#x00A0;<span class="sectionToc" >1.4 <a 
href="#x1-200001.4" id="QQ2-1-29">Laboratory Exercises</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.1 <a 
href="#x1-210001.4.1" id="QQ2-1-30">Linear projection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.2 <a 
href="#x1-230001.4.2" id="QQ2-1-32">Logarithmic projection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.3 <a 
href="#x1-250001.4.3" id="QQ2-1-34">Mercator projection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.4 <a 
href="#x1-270001.4.4" id="QQ2-1-37">Albers projection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.5 <a 
href="#x1-290001.4.5" id="QQ2-1-39">Orthographic projection</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >1.4.6 <a 
href="#x1-310001.4.6" id="QQ2-1-41">Eckert IV and VI projection</a></span>
<br />   <span class="chapterToc" >2 <a 
href="#x1-330002" id="QQ2-1-43">SESSION TWO</a></span>
<br />   &#x00A0;<span class="sectionToc" >2.1 <a 
href="#x1-340002.1" id="QQ2-1-44">General Information</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >2.1.1 <a 
href="#x1-350002.1.1" id="QQ2-1-48">Examples</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >2.1.2 <a 
href="#x1-360002.1.2" id="QQ2-1-49">Exercises</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >2.1.3 <a 
href="#x1-370002.1.3" id="QQ2-1-50">More exercises</a></span>
<br />   &#x00A0;<span class="sectionToc" >2.2 <a 
href="#x1-380002.2" id="QQ2-1-51">Plotting text strings</a></span>
<br />   &#x00A0;<span class="sectionToc" >2.3 <a 
href="#x1-390002.3" id="QQ2-1-57">Exercises</a></span>
<br />   <span class="chapterToc" >3 <a 
href="#x1-400003" id="QQ2-1-58">SESSION THREE</a></span>
<br />   &#x00A0;<span class="sectionToc" >3.1 <a 
href="#x1-410003.1" id="QQ2-1-59">Contouring gridded data sets</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >3.1.1 <a 
href="#x1-420003.1.1" id="QQ2-1-61">Exercises</a></span>
<br />   &#x00A0;<span class="sectionToc" >3.2 <a 
href="#x1-430003.2" id="QQ2-1-62">Gridding of arbitrarily spaced data</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >3.2.1 <a 
href="#x1-440003.2.1" id="QQ2-1-63">Nearest neighbor gridding</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >3.2.2 <a 
href="#x1-460003.2.2" id="QQ2-1-67">Gridding with Splines in Tension</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >3.2.3 <a 
href="#x1-470003.2.3" id="QQ2-1-69">Preprocessing</a></span>
<br />   &#x00A0;<span class="sectionToc" >3.3 <a 
href="#x1-480003.3" id="QQ2-1-71">Exercises</a></span>
<br />   <span class="chapterToc" >4 <a 
href="#x1-490004" id="QQ2-1-72">SESSION FOUR</a></span>
<br />   &#x00A0;<span class="sectionToc" >4.1 <a 
href="#x1-500004.1" id="QQ2-1-73">Cpt files</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >4.1.1 <a 
href="#x1-510004.1.1" id="QQ2-1-76">Exercises</a></span>
<br />   &#x00A0;<span class="sectionToc" >4.2 <a 
href="#x1-520004.2" id="QQ2-1-77">Illumination and intensities</a></span>
<br />   &#x00A0;<span class="sectionToc" >4.3 <a 
href="#x1-530004.3" id="QQ2-1-78">Color images</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >4.3.1 <a 
href="#x1-540004.3.1" id="QQ2-1-82">Exercises</a></span>
<br />   &#x00A0;<span class="sectionToc" >4.4 <a 
href="#x1-550004.4" id="QQ2-1-83">Multi-dimensional maps</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >4.4.1 <a 
href="#x1-560004.4.1" id="QQ2-1-84">Exercises</a></span>
<br />   &#x00A0;<span class="sectionToc" >4.5 <a 
href="#x1-570004.5" id="QQ2-1-85">Perspective views</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >4.5.1 <a 
href="#x1-580004.5.1" id="QQ2-1-87">Mesh-plot</a></span>
<br />   &#x00A0;&#x00A0;<span class="subsectionToc" >4.5.2 <a 
href="#x1-600004.5.2" id="QQ2-1-89">Color-coded view</a></span>
<br />   <span class="chapterToc" >5 <a 
href="#x1-620005" id="QQ2-1-91">References</a></span>
                                                                                 

                                                                                 
   </div>
                                                                                 

                                                                                 
   <h2 class="likechapterHead"><a 
 id="x1-2000"></a>INTRODUCTION</h2>   <a 
 id="Q1-1-4"></a> <a 
 id="dx1-2001"></a>
<!--l. 32--><p class="noindent" >The purpose of this tutorial is to introduce new users to <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>, outline the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;environment, and enable you to
make several forms of graphics without having to know too much about <span 
class="ptmri8t-">UNIX</span>&#x00A0;and <span 
class="ptmri8t-">UNIX</span>&#x00A0;tools. We will not be
able to cover all aspects of <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;nor will we necessarily cover the selected topics in sufficient detail.
Nevertheless, it is hoped that the exposure will prompt the users to improve their <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;and <span 
class="ptmri8t-">UNIX</span>&#x00A0;skills after
completion of this short tutorial.
</p>
   <h3 class="likesectionHead"><a 
 id="x1-3000"></a><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;overview: History, philosophy, and usage</h3>
<a 
 id="Q1-1-6"></a>
<!--l. 44--><p class="noindent" >
</p>
   <h4 class="likesubsectionHead"><a 
 id="x1-4000"></a>Historical highlights</h4>
<a 
 id="Q1-1-8"></a>
<a 
 id="dx1-4001"></a>
<!--l. 48--><p class="noindent" >The <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;system was initiated in late 1987 at Lamont-Doherty Earth Observatory, Columbia University by
graduate students Paul Wessel and Walter H. F. Smith. Version 1 was officially introduced to Lamont scientists in
July 1988. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;1 migrated by word of mouth (and tape) to other institutions in the United States, UK, Japan, and
France and attracted a small following. Paul took a Post-doctoral position at SOEST in December 1989 and
continued the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;development. Version 2.0 was released with an article in EOS, October 1991, and quickly
spread worldwide. We obtained NSF-funding for <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;version 3.0 in 1993 which was released with another
article in EOS on August 15, 1995. Significantly improved versions (3.1-3.3, 3.3.1&#8211;6), 3.4, 3.4.1&#8211;5,
and 4.0&#8211;4.5.9 were released between November 1998 and April 2013, culminating in the November
2013&#x00A0;introduction of 4.5.11. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;now is used by ten thousands of users worldwide in a broad range of
disciplines.
</p><!--l. 63--><p class="noindent" >
</p>
   <h4 class="likesubsectionHead"><a 
 id="x1-5000"></a>Philosophy</h4>
<a 
 id="Q1-1-10"></a>
<a 
 id="dx1-5001"></a>
<!--l. 67--><p class="noindent" ><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;follows the <span 
class="ptmri8t-">UNIX</span>&#x00A0;philosophy in which complex tasks are broken down into smaller and more manageable
components. Individual <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;modules are small, easy to maintain, and can be used as any other <span 
class="ptmri8t-">UNIX</span>&#x00A0;tool.
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;is written in the ANSI C programming language (very portable), is POSIX compliant, and is independent of
hardware constraints (e.g., memory). <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;was deliberately written for command-line usage, not a windows
environment, in order to maximize flexibility. We standardized early on to use <span 
class="ptmri8t-">PostScript</span>&#x00A0;output
instead of other graphics formats. Apart from the built-in support for coastlines, <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;completely
decouples data retrieval from the main <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;uses architecture-independent file
formats.
</p><!--l. 79--><p class="noindent" >
</p>
   <h4 class="likesubsectionHead"><a 
 id="x1-6000"></a>Why is <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;so popular?</h4>
<a 
 id="Q1-1-12"></a>
<a 
 id="dx1-6001"></a>
<!--l. 83--><p class="noindent" >The price is right! Also, <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;offers unlimited flexibility since it can be called from the command line, inside
scripts, and from user programs. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;has attracted many users because of its high quality <span 
class="ptmri8t-">PostScript</span>&#x00A0;output.
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;easily installs on almost any computer.
                                                                                 

                                                                                 
</p><!--l. 88--><p class="noindent" >
</p>
   <h4 class="likesubsectionHead"><a 
 id="x1-7000"></a><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;installation considerations</h4>
<a 
 id="Q1-1-14"></a>
<a 
 id="dx1-7001"></a>
<!--l. 92--><p class="noindent" ><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;has been installed on machines ranging from super-computers to lap-top PCs. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;only contains
some 100,000 lines of code and has modest space/memory requirements. Minimum requirements are
<a 
 id="dx1-7002"></a>
</p>
   <ul class="itemize1">
   <li class="itemize">The netCDF library 3.4 or higher (free from www.unidata.edu).
   </li>
   <li class="itemize">A C Compiler (free from www.gnu.org).
   </li>
   <li class="itemize">About 100 Mb disk space (70 Mb additional for full- and high-resolution coast-lines).
   </li>
   <li class="itemize">About 32 Mb memory.
   </li></ul>
<!--l. 107--><p class="indent" >   In addition, we recommend access to a <span 
class="ptmri8t-">PostScript</span>&#x00A0;printer or equivalent (e.g., <span 
class="ptmbo8t-">ghostscript</span><a 
 id="dx1-7003"></a>),
<span 
class="ptmri8t-">PostScript</span>&#x00A0;previewer (e.g., <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-7004"></a> (ghostview)), any flavor of the <span 
class="ptmri8t-">UNIX</span>&#x00A0;operating system, and more disk space and
memory.
                                                                                 

                                                                                 
</p>
   <h2 class="chapterHead"><span class="titlemark">Chapter&#x00A0;1</span><br /><a 
 id="x1-80001"></a>SESSION ONE</h2>
   <h3 class="sectionHead"><span class="titlemark">1.1    </span> <a 
 id="x1-90001.1"></a>Tutorial setup</h3>
<!--l. 115--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-9002x1">We assume that <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;has been properly and fully installed and that the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;executables are in your
   executable path described in the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;<span class="underline">README</span> file.
   </li>
   <li 
  class="enumerate" id="x1-9004x2">All <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;man pages, documentation, and example scripts are available from the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;documentation
   web page. It is assumed these pages have been installed locally at your site; if not they are always
   available from the main <a 
href="http://gmt.soest.hawaii.edu" >GMT home page</a>.
   </li>
   <li 
  class="enumerate" id="x1-9006x3">We  recommend  you  create  a  sub-directory  called  <span class="underline">tutorial</span>,  cd  into  that  directory,  and  copy  all
   the  tutorial  files  directly  there.  Depending  on  your  installation  the  tutorial  files  are  likely  in
   <span class="underline">/usr/share/doc/gmt/tutorial</span>.
   </li>
   <li 
  class="enumerate" id="x1-9008x4">As we discuss <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;principles it may be a good idea to consult the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;Technical Reference and
   Cookbook for more detailed explanations.
   </li>
   <li 
  class="enumerate" id="x1-9010x5">The  tutorial  uses  the  supplemental  <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;program  <a 
href="../html/man/grdraster.html" ><span 
class="phvb8t-">grdraster</span></a><a 
 id="dx1-9011"></a> to  extract  subsets  of  global  gridded
   data  sets.  For  your  convenience  we  also  supply  the  subsets  in  the  event  you  do  not  wish  to  install
   <a 
href="../html/man/grdraster.html" ><span 
class="phvb8t-">grdraster</span></a><a 
 id="dx1-9012"></a> and the public data sets it can read. Thus, run the <a 
href="../html/man/grdraster.html" ><span 
class="phvb8t-">grdraster</span></a><a 
 id="dx1-9013"></a> commands if you have made
   the installation or ignore them if you have not.
   </li>
   <li 
  class="enumerate" id="x1-9015x6">For  all  but  the  simplest  <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;jobs  it  is  recommended  that  you  place  all  the  <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;(and  <span 
class="ptmri8t-">UNIX</span>)
   commands in a shell script file and make it executable. To ensure that <span 
class="ptmri8t-">UNIX</span>&#x00A0;recognizes your script as
   a shell script it is a good habit always to start the script with the line #!/bin/sh or #!/bin/csh, depending
   on the shell you prefer to use. All the examples in this tutorial assumes you are running the Bourne
   shell, <span 
class="ptmbo8t-">sh</span><a 
 id="dx1-9016"></a>; if you are using something different then you are on your own.
   </li>
   <li 
  class="enumerate" id="x1-9018x7">Making a script executable is accomplished using the <span 
class="pcrr8t-">chmod </span>command, e.g., the script <span class="underline">figure_1.sh</span> is
   made executable with &#8220;<span 
class="pcrr8t-">chmod +x figure_1.sh</span>&#8221;.
   </li>
   <li 
  class="enumerate" id="x1-9020x8">To view a <span 
class="ptmri8t-">PostScript</span>&#x00A0;file (e.g., <span class="underline">map.ps</span>) on a UNIX workstation we use <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-9021"></a> <span class="underline">map.ps</span>. On some systems
   there will be similar commands, like <span class="underline">imagetool</span> and <span class="underline">pageview</span> on Sun workstations. In this text we will
   refer to <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-9022"></a>; please substitute the relevant <span 
class="ptmri8t-">PostScript</span>&#x00A0;previewer on your system.
   </li>
   <li 
  class="enumerate" id="x1-9024x9">Please cd into the directory <span class="underline">tutorial</span>. We are now ready to start.
   </li></ol>
<!--l. 167--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">1.2    </span> <a 
 id="x1-100001.2"></a>The <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;environment: What happens when you run <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>?</h3>
<a 
 id="dx1-10001"></a>
                                                                                 

                                                                                 
<a 
 id="dx1-10002"></a>
<!--l. 171--><p class="noindent" >To get a good grasp on <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;one must understand what is going on &#8220;under the hood&#8221;. Figure&#x00A0;<a 
href="#x1-10003r1">1.1<!--tex4ht:ref: fig:GMT_Environment --></a> illustrates the
relationships you need to be aware of at run-time.
</p>
   <hr class="figure" /><div class="figure" 
>
                                                                                 

                                                                                 
<a 
 id="x1-10003r1"></a>
                                                                                 

                                                                                 

<!--l. 176--><p class="noindent" ><img 
src="images/GMT_Environment.png" alt="PIC"  
 />
<br /> </p><div class="caption" 
><span class="id">Figure&#x00A0;1.1: </span><span  
class="content">The <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;run-time environment.</span></div><!--tex4ht:label?: x1-10003r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfigure" />
   <h4 class="subsectionHead"><span class="titlemark">1.2.1    </span> <a 
 id="x1-110001.2.1"></a>Input data</h4>
<!--l. 182--><p class="noindent" >A <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;program may or may not take input files. Three different types of input are recognized (more details can
be found in Appendix B in the Technical Reference): <a 
 id="dx1-11001"></a><a 
 id="dx1-11002"></a>
</p><!--l. 188--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-11004x1">Data tables. These are &#8220;spreadsheet&#8221; tables with a fixed number of columns and unlimited number of
   rows. We distinguish between two groups:
      <ul class="itemize1">
      <li class="itemize">ASCII (Preferred unless files are huge)
         <dl class="description"><dt class="description">
      <span 
class="ptmb8t-">&#8211;</span> </dt><dd 
class="description">Single segment [Default]
         </dd><dt class="description">
      <span 
class="ptmb8t-">&#8211;</span> </dt><dd 
class="description">Multi-segment with internal header records (<span 
class="ptmb8t-">&#8211;M</span>)</dd></dl>
      </li>
      <li class="itemize">Binary (to speed up input/output)
         <dl class="description"><dt class="description">
      <span 
class="ptmb8t-">&#8211;</span> </dt><dd 
class="description">Single segment [Default]
         </dd><dt class="description">
      <span 
class="ptmb8t-">&#8211;</span> </dt><dd 
class="description">Multi-segment (segment headers are all NaN fields) (<span 
class="ptmb8t-">&#8211;M</span>)</dd></dl>
      </li></ul>
   </li>
   <li 
  class="enumerate" id="x1-11006x2">Gridded dated sets. These are data matrices (evenly spaced in two coordinates) that come in two
   flavors:
      <ul class="itemize1">
      <li class="itemize">Grid-line registration
      </li>
      <li class="itemize">Pixel registration
      </li></ul>
   <!--l. 228--><p class="noindent" >You may choose among several file formats (even define your own format), but the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;default is the
   architecture-indenpendent netCDF format.
   </p></li>
   <li 
  class="enumerate" id="x1-11008x3">Color palette table (For imaging, color plots, and contour maps). We will discuss these later.
   </li></ol>
                                                                                 

                                                                                 
<!--l. 236--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.2.2    </span> <a 
 id="x1-120001.2.2"></a>Job Control</h4>
<!--l. 238--><p class="noindent" ><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs may get operational parameters from several places:
</p><!--l. 240--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-12002x1">Supplied command line options/switches or program defaults.
   </li>
   <li 
  class="enumerate" id="x1-12004x2">Short-hand notation to select previously used option arguments (stored in <span class="underline">.gmtcommands4</span>). <a 
 id="dx1-12005"></a>
   </li>
   <li 
  class="enumerate" id="x1-12007x3">Implicitly using <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;defaults for a variety of parameters (stored in <span class="underline">.gmtdefaults4</span>).
   </li>
   <li 
  class="enumerate" id="x1-12009x4">May use hidden support data like coastlines or <span 
class="ptmri8t-">PostScript</span>&#x00A0;patterns.
   </li></ol>
<!--l. 255--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.2.3    </span> <a 
 id="x1-130001.2.3"></a>Output data</h4>
<!--l. 256--><p class="noindent" >There are 6 general categories of output produced by <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>:
</p><!--l. 258--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-13002x1"><span 
class="ptmri8t-">PostScript</span>&#x00A0;plot commands.
   </li>
   <li 
  class="enumerate" id="x1-13004x2">Data Table(s).
   </li>
   <li 
  class="enumerate" id="x1-13006x3">Gridded data set(s).
   </li>
   <li 
  class="enumerate" id="x1-13008x4">Statistics &amp; Summaries.
   </li>
   <li 
  class="enumerate" id="x1-13010x5">Warnings and Errors, written to <span 
class="ptmri8t-">stderr</span>.
   </li>
   <li 
  class="enumerate" id="x1-13012x6">Exit status (0 means success, otherwise failure).
   </li></ol>
<!--l. 274--><p class="indent" >   Note: <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;automatically creates and updates a history of past <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;command options for the common
switches. This history file is called <span class="underline">.gmtcommands</span> and one will be created in every directory from which
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs are executed. Many initial problems with <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;usage result from not fully appreciating the
relationships shown in Figure&#x00A0;<a 
href="#x1-10003r1">1.1<!--tex4ht:ref: fig:GMT_Environment --></a>.
</p><!--l. 281--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">1.3    </span> <a 
 id="x1-140001.3"></a>The UNIX Environment: Entry Level Knowledge</h3>
                                                                                 

                                                                                 
<!--l. 283--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.3.1    </span> <a 
 id="x1-150001.3.1"></a>Redirection</h4>
<a 
 id="dx1-15001"></a>
<a 
 id="dx1-15002"></a>
<!--l. 287--><p class="noindent" >Most <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs read their input from the terminal (called <span 
class="ptmri8t-">stdin</span>) or from files, and write their output to the
terminal (called <span 
class="ptmri8t-">stdout</span>). To use files instead one can use <span 
class="ptmri8t-">UNIX</span>&#x00A0;redirection:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-1">
GMTprogram&#x00A0;input-file&#x00A0;&#x003E;&#x00A0;output-file
&#x00A0;<br />GMTprogram&#x00A0;&#x003C;&#x00A0;input-file&#x00A0;&#x003E;&#x00A0;output-file
&#x00A0;<br />GMTprogram&#x00A0;input-file&#x00A0;&#x003E;&#x003E;&#x00A0;output-file&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;#&#x00A0;Append&#x00A0;to&#x00A0;existing&#x00A0;file
</div>
<!--l. 296--><p class="nopar" >
</p><!--l. 299--><p class="noindent" >In this example, and in all those to follow, it is assumed that you do not have the shell variable <span 
class="ptmb8t-">noclobber </span>set. If
you do, it prevents accidental overwriting of existing files. That may be a noble cause, but it is extremely annoying.
So please, <span 
class="ptmb8t-">unset noclobber</span>.
</p><!--l. 304--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.3.2    </span> <a 
 id="x1-160001.3.2"></a>Piping (<!--l. 304--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math>)</h4>
<a 
 id="dx1-16001"></a>
<a 
 id="dx1-16002"></a>
<!--l. 308--><p class="noindent" >Sometimes we want to use the output from one program as input to another program. This is achieved with
<span 
class="ptmri8t-">UNIX</span>&#x00A0;pipes:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-2">
Someprogram&#x00A0;|&#x00A0;GMTprogram1&#x00A0;|&#x00A0;GMTprogram2&#x00A0;&#x003E;&#x00A0;Output-file&#x00A0;(or&#x00A0;|&#x00A0;lp)
</div>
<!--l. 313--><p class="nopar" >
</p><!--l. 316--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.3.3    </span> <a 
 id="x1-170001.3.3"></a>Standard error (<span 
class="ptmri8t-">stderr</span>)</h4>
<a 
 id="dx1-17001"></a>
<a 
 id="dx1-17002"></a>
<!--l. 320--><p class="noindent" >Most <span 
class="ptmri8t-">UNIX</span>&#x00A0;and <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs will on occasion write error messages. These are typically written to a separate
data stream called <span 
class="ptmri8t-">stderr </span>and can be redirected separately from the standard output (which goes to <span 
class="ptmri8t-">stdout</span>). To send
the error messages to the same location as standard output we use
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-3">
UNIXprogram&#x00A0;&#x003E;&#x00A0;errors.log&#x00A0;2&#x003E;&amp;1
</div>
<!--l. 328--><p class="nopar" >
</p><!--l. 331--><p class="indent" >   When we want to save both program output and error messages to separate files we use the following
syntax:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-4">
GMTprogram&#x00A0;&#x003E;&#x00A0;output.d&#x00A0;2&#x003E;&#x00A0;errors.log
</div>
<!--l. 336--><p class="nopar" >
</p><!--l. 339--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.3.4    </span> <a 
 id="x1-180001.3.4"></a>File name expansion or &#8220;wild cards&#8221;</h4>
<a 
 id="dx1-18001"></a>
<a 
 id="dx1-18002"></a>
<!--l. 343--><p class="noindent" ><span 
class="ptmri8t-">UNIX</span>&#x00A0;provides several ways to select groups of files based on name patterns (Table&#x00A0;<a 
href="#x1-18003r1">1.1<!--tex4ht:ref: tbl:wildcard --></a>):
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 346--><p class="indent" >   <a 
 id="x1-18003r1"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-1" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-1-1g"><col 
id="TBL-1-1" /></colgroup><colgroup id="TBL-1-2g"><col 
id="TBL-1-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-1-1-1"  
class="td11"> <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Code</span></div> </td><td  style="text-align:center; white-space:nowrap;" id="TBL-1-1-2"  
class="td11">          <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Meaning</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-1-2-1"  
class="td11"><span 
class="ptmr8t-x-x-90">*          </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-1-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Matches anything                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-1-3-1"  
class="td11"><span 
class="ptmr8t-x-x-90">?          </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-1-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Matches any single character              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-1-4-1"  
class="td11"><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">list</span><span 
class="ptmr8t-x-x-90">]    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-1-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Matches characters in the list              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-1-5-1"  
class="td11"><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">range</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-1-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Matches characters in the given range</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-1-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-1-6-1"  
class="td11">     </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;1.1: </span><span  
class="content"><span 
class="ptmri8t-">UNIX</span>&#x00A0;wildcards.</span></div><!--tex4ht:label?: x1-18003r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 359--><p class="noindent" >You can save much time by getting into the habit of selecting &#8220;good&#8221; filenames that make it easy to select subsets
of all files using the <span 
class="ptmri8t-">UNIX</span>&#x00A0;wild card notation.
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-190001.3.4"></a>Examples</h5>
<a 
 id="dx1-19001"></a>
   <ul class="itemize1">
   <li class="itemize">GMTprogram data_*.d operates on all files starting with &#8220;data_&#8221; and ending in &#8220;.d&#8221;.
   </li>
   <li class="itemize">GMTprogram line_?.d works on all files starting with &#8220;line_&#8221; followed by any single character and
   ending in &#8220;.d&#8221;.
   </li>
   <li class="itemize">GMTprogram section_1[0-9]0.part_[12] only processes data from sections 100 through 190, only using
   every 10th profile, and gets both part 1 and 2.
   </li></ul>
<a 
 id="dx1-19002"></a>
<!--l. 381--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">1.4    </span> <a 
 id="x1-200001.4"></a>Laboratory Exercises</h3>
<!--l. 383--><p class="noindent" >We will begin our adventure by making some simple plot axes and coastline basemaps. We will do this in order to
introduce the all-important <span 
class="pcrb8t-">-B</span>, <span 
class="pcrb8t-">-J</span>, and <span 
class="pcrb8t-">-R </span>switches and to familiarize ourselves with a few selected
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;projections. The <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs we will utilize are <a 
href="../html/man/psbasemap.html" ><span 
class="phvb8t-">psbasemap</span></a><a 
 id="dx1-20001"></a> and <a 
href="../html/man/pscoast.html" ><span 
class="phvb8t-">pscoast</span></a><a 
 id="dx1-20002"></a>. Please consult their
manual pages on the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;web site for reference.
</p><!--l. 390--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.1    </span> <a 
 id="x1-210001.4.1"></a>Linear projection</h4>
<a 
 id="dx1-21001"></a>
<a 
 id="dx1-21002"></a>
<!--l. 394--><p class="noindent" >We start by making the basemap frame for a linear <span 
class="ptmri8t-">x-y </span>plot. We want it to go from 10 to 70 in <span 
class="ptmri8t-">x</span>, annotating every
10, and from -3 to 8 in <span 
class="ptmri8t-">y</span>, annotating every 1. The final plot should be 4 by 3 inches in size. Here&#8217;s how we do
it:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-5">
psbasemap&#x00A0;-R10/70/-3/8&#x00A0;-JX4i/3i&#x00A0;-B10/1:.~My&#x00A0;first&#x00A0;plot~:&#x00A0;-P&#x00A0;&#x003E;&#x00A0;plot.ps
</div>
<!--l. 401--><p class="nopar" >
</p><!--l. 404--><p class="noindent" >You can view the result with <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-21003"></a> <span class="underline">plot.ps</span>.
</p><!--l. 407--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-220001.4.1"></a>Exercises</h5>
<a 
 id="dx1-22001"></a>
<!--l. 410--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-22003x1">Try change the <span 
class="pcrb8t-">-JX </span>values.
   </li>
   <li 
  class="enumerate" id="x1-22005x2">Try change the <span 
class="pcrb8t-">-B </span>values.
   </li>
   <li 
  class="enumerate" id="x1-22007x3">Omit the <span 
class="pcrb8t-">-P</span>.
   </li></ol>
<a 
 id="dx1-22008"></a>
<!--l. 421--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.2    </span> <a 
 id="x1-230001.4.2"></a>Logarithmic projection</h4>
<a 
 id="dx1-23001"></a>
<a 
 id="dx1-23002"></a>
<!--l. 425--><p class="noindent" >We next will show how to do a basemap for a log&#8211;log plot. We will assume that the raw <span 
class="ptmri8t-">x </span>data range from 3 to 9613 and <span 
class="ptmri8t-">y</span>
ranges from <!--l. 427--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mn>3</mn><mo 
class="MathClass-punc">.</mo><mn>2</mn><mo 
class="MathClass-bin">&#x22C5;</mo><mn>1</mn><msup><mrow 
><mn>0</mn></mrow><mrow 
><mn>2</mn><mn>0</mn></mrow></msup 
></math>
to <!--l. 427--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mn>6</mn><mo 
class="MathClass-punc">.</mo><mn>8</mn><mo 
class="MathClass-bin">&#x22C5;</mo><mn>1</mn><msup><mrow 
><mn>0</mn></mrow><mrow 
><mn>2</mn><mn>4</mn></mrow></msup 
></math>. One
possibility is
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-6">
psbasemap&#x00A0;-R1/10000/1e20/1e25&#x00A0;-JX9il/6il&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;-B2:~Wavelength&#x00A0;(m)~:/a1pf3:~Power&#x00A0;(W)~:WS&#x00A0;&#x003E;&#x00A0;plot.ps
</div>
<!--l. 432--><p class="nopar" >
</p><!--l. 435--><p class="noindent" >(The backslash <!--l. 436--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-bin">\</mo></math>
makes <span 
class="ptmri8t-">UNIX</span>&#x00A0;ignore the carriage return that follows and treat the two lines as one long command).
</p><!--l. 438--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-240001.4.2"></a>Exercises</h5>
<a 
 id="dx1-24001"></a>
<!--l. 441--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-24003x1">Do not append <span 
class="ptmb8t-">l </span>to the axes lengths.
   </li>
   <li 
  class="enumerate" id="x1-24005x2">Leave the <span 
class="ptmb8t-">p </span>modifier out of the <span 
class="pcrb8t-">-B </span>string.
   </li>
   <li 
  class="enumerate" id="x1-24007x3">Add <span 
class="ptmb8t-">g</span>3 to each side of the slash in <span 
class="pcrb8t-">-B</span>.
   </li></ol>
<a 
 id="dx1-24008"></a>
<!--l. 452--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.3    </span> <a 
 id="x1-250001.4.3"></a>Mercator projection</h4>
<a 
 id="dx1-25001"></a>
<a 
 id="dx1-25002"></a>
<!--l. 456--><p class="noindent" >Despite the problems of extreme horizontal exaggeration at high latitudes, the conformal Mercator projection
(<span 
class="pcrb8t-">-JM</span>) remains the stalwart of location maps used by scientists. It is one of several cylindrical projections offered
by <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>; here we will only have time to focus on one such projection. The complete syntax is simply
<br 
class="newline" />
</p><!--l. 463--><p class="indent" >   <span 
class="pcrb8t-">-JM</span><span 
class="ptmri8t-">width </span><br 
class="newline" />
</p><!--l. 465--><p class="indent" >   To make coastline maps we use <a 
href="../html/man/pscoast.html" ><span 
class="phvb8t-">pscoast</span></a><a 
 id="dx1-25003"></a> which automatically will access the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;coastline, river and border data base derived
from the GSHHG database<span class="footnote-mark"><a 
href="#fn1x1" id="fn1x1-bk"><sup class="textsuperscript">1</sup></a></span><a 
 id="x1-25004f1"></a>.
In addition to the common switches we may need to use some of several <a 
href="../html/man/pscoast.html" ><span 
class="phvb8t-">pscoast</span></a><a 
 id="dx1-25005"></a> -specific options (see
Table&#x00A0;<a 
href="#x1-25006r2">1.2<!--tex4ht:ref: tbl:pscoast --></a>).
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 471--><p class="indent" >   <a 
 id="x1-25006r2"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-2" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-2-1g"><col 
id="TBL-2-1" /></colgroup><colgroup id="TBL-2-2g"><col 
id="TBL-2-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-2-1-1"  
class="td11"><div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div></td><td  style="text-align:center; white-space:nowrap;" id="TBL-2-1-2"  
class="td11">                       <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-A   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Exclude small features or those of high hierarchical levels (see Appendix K)</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-D   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Select data resolution (</span><span 
class="ptmb8t-x-x-90">f</span><span 
class="ptmr8t-x-x-90">ull, </span><span 
class="ptmb8t-x-x-90">h</span><span 
class="ptmr8t-x-x-90">igh, </span><span 
class="ptmb8t-x-x-90">i</span><span 
class="ptmr8t-x-x-90">ntermediate, </span><span 
class="ptmb8t-x-x-90">l</span><span 
class="ptmr8t-x-x-90">ow, or </span><span 
class="ptmb8t-x-x-90">c</span><span 
class="ptmr8t-x-x-90">rude)                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-G   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set color of dry areas (default does not paint)                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-I   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw rivers (chose features from one or more hierarchical categories)           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-L   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot map scale (length scale can be km, miles, or nautical miles)                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw political borders (including US state borders)                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set color for wet areas (default does not paint)                                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-9-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-2-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw coastlines and set pen thickness                                                              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-2-10-"><td  style="text-align:left; white-space:nowrap;" id="TBL-2-10-1"  
class="td11">     </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;1.2: </span><span  
class="content">Main options when making coastline plots or overlays.</span></div><!--tex4ht:label?: x1-25006r2 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 488--><p class="indent" >   One of <span 
class="pcrb8t-">-W</span>, <span 
class="pcrb8t-">-G</span>, <span 
class="pcrb8t-">-S </span>must be selected. Our first coastline example is from Latin America:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-7">
pscoast&#x00A0;-R-90/-70/0/20&#x00A0;-JM6i&#x00A0;-P&#x00A0;-B5g5&#x00A0;-Gchocolate&#x00A0;&#x003E;&#x00A0;map.ps
</div>
<!--l. 493--><p class="nopar" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-260001.4.3"></a>Exercises</h5>
<a 
 id="dx1-26001"></a>
<!--l. 499--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-26003x1">Add the <span 
class="pcrb8t-">-V </span>option.
   </li>
   <li 
  class="enumerate" id="x1-26005x2">Try <span 
class="pcrb8t-">-R</span>270/290/0/20 instead. What happens to the annotations?
   </li>
   <li 
  class="enumerate" id="x1-26007x3">Edit  your  <span class="underline">.gmtdefaults4</span>  file,  change  <span 
class="ptmb8t-">PLOT_DEGREE_FORMAT  </span>to  another  setting  (see  the
   <a 
href="../html/man/gmtdefaults.html" ><span 
class="phvb8t-">gmtdefaults</span></a><a 
 id="dx1-26008"></a> man page), and plot again.
   </li>
   <li 
  class="enumerate" id="x1-26010x4">Pick another region and change land color.
   </li>
   <li 
  class="enumerate" id="x1-26012x5">Pick a region that includes the north or south poles.
   </li>
   <li 
  class="enumerate" id="x1-26014x6">Try <span 
class="pcrb8t-">-W</span>0.25<span 
class="ptmb8t-">p </span>instead of (or in addition to) <span 
class="pcrb8t-">-G</span>.
   </li></ol>
<a 
 id="dx1-26015"></a>
<!--l. 517--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.4    </span> <a 
 id="x1-270001.4.4"></a>Albers projection</h4>
<a 
 id="dx1-27001"></a>
<a 
 id="dx1-27002"></a>
<!--l. 521--><p class="noindent" >The Albers projection (<span 
class="pcrb8t-">-JB</span>) is an equal-area conical projection; its conformal cousin is the Lambert conic
projection (<span 
class="pcrb8t-">-JL</span>). Their usages are almost identical so we will only use the Albers here. The general syntax is
<br 
class="newline" />
</p><!--l. 526--><p class="indent" >   <span 
class="pcrb8t-">-JB</span><!--l. 526--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>1</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>2</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>w</mi><mi 
>i</mi><mi 
>d</mi><mi 
>t</mi><mi 
>h</mi></math>
<br 
class="newline" />
</p><!--l. 528--><p class="noindent" >where (<!--l. 529--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
></math>) is the map
(projection) center and <!--l. 529--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>1</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>2</mn></mrow></msub 
></math>
are the two standard parallels where the cone intersects the Earth&#8217;s surface. We try the following
command:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-8">
pscoast&#x00A0;-R-130/-70/24/52&#x00A0;-JB-100/35/33/45/6i&#x00A0;-B10g5:.~Conic&#x00A0;Projection~:&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;-N1/thickest&#x00A0;-N2/thinnest&#x00A0;-A500&#x00A0;-Ggray&#x00A0;-Wthinnest&#x00A0;-P&#x00A0;&#x003E;&#x00A0;map.ps
</div>
<!--l. 536--><p class="nopar" >
</p><!--l. 539--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-280001.4.4"></a>Exercises</h5>
<a 
 id="dx1-28001"></a>
<!--l. 542--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-28003x1">Change the parameter <span 
class="ptmb8t-">GRID_CROSS_SIZE_PRIMARY </span>to make grid crosses instead of gridlines.
   </li>
   <li 
  class="enumerate" id="x1-28005x2">Change <span 
class="pcrb8t-">-R </span>to a rectangular box specification instead of minimum and maximum values.
   </li></ol>
<a 
 id="dx1-28006"></a>
<!--l. 552--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.5    </span> <a 
 id="x1-290001.4.5"></a>Orthographic projection</h4>
<a 
 id="dx1-29001"></a>
<a 
 id="dx1-29002"></a>
<!--l. 556--><p class="noindent" >The azimuthal orthographic projection (<span 
class="pcrb8t-">-JG</span>) is one of several projections with similar syntax and behavior; the
one we have chosen mimics viewing the Earth from space at an infinite distance; it is neither conformal nor
equal-area. The syntax for this projection is <br 
class="newline" />
</p><!--l. 562--><p class="indent" >   <span 
class="pcrb8t-">-JG</span><!--l. 562--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>w</mi><mi 
>i</mi><mi 
>d</mi><mi 
>t</mi><mi 
>h</mi></math>
<br 
class="newline" />
</p><!--l. 564--><p class="noindent" >where (<!--l. 565--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><mi 
>l</mi><mi 
>a</mi><msub><mrow 
><mi 
>t</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
></math>)
is the center of the map (projection). As an example we will try
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-9">
pscoast&#x00A0;-R0/360/-90/90&#x00A0;-JG280/30/6i&#x00A0;-Bg30/g15&#x00A0;-Dc&#x00A0;-A5000&#x00A0;-Gwhite&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;-SDarkTurquoise&#x00A0;-P&#x00A0;&#x003E;&#x00A0;map.ps
</div>
<!--l. 571--><p class="nopar" >
</p><!--l. 574--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-300001.4.5"></a>Exercises</h5>
<a 
 id="dx1-30001"></a>
<!--l. 577--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-30003x1">Use the rectangular option in <span 
class="pcrb8t-">-R </span>to make a rectangular map showing the US only.
   </li></ol>
<a 
 id="dx1-30004"></a>
<!--l. 585--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">1.4.6    </span> <a 
 id="x1-310001.4.6"></a>Eckert IV and VI projection</h4>
<a 
 id="dx1-31001"></a>
<a 
 id="dx1-31002"></a>
<!--l. 589--><p class="noindent" >We conclude the survey of map projections with the Eckert IV and VI projections (<span 
class="pcrb8t-">-JK</span>), two of several
projections used for global thematic maps; They are both equal-area projections whose syntax is
<br 
class="newline" />
</p><!--l. 593--><p class="indent" >
<span 
class="pcrb8t-">-JK</span>[<span 
class="ptmb8t-">f</span><!--l. 593--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-">s</span>]<!--l. 593--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-bin">&#x2215;</mo><mi 
>w</mi><mi 
>i</mi><mi 
>d</mi><mi 
>t</mi><mi 
>h</mi></math>
<br 
class="newline" />
</p><!--l. 595--><p class="noindent" >where <span 
class="ptmb8t-">f </span>gives Eckert IV (4) and <span 
class="ptmb8t-">s </span>(Default) gives Eckert VI (6). The
<!--l. 597--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>l</mi><mi 
>o</mi><msub><mrow 
><mi 
>n</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
></math> is the
central meridian (which takes precedence over the mid-value implied by the <span 
class="pcrb8t-">-R </span>setting). A simple Eckert VI world
map is thus generated by
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-10">
pscoast&#x00A0;-R0/360/-90/90&#x00A0;-JKs180/9i&#x00A0;-B60g30/30g15&#x00A0;-Dc&#x00A0;-A5000&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;-Gchocolate&#x00A0;-SDarkTurquoise&#x00A0;-Wthinnest&#x00A0;&#x003E;&#x00A0;map.ps
</div>
<!--l. 604--><p class="nopar" >
</p><!--l. 607--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-320001.4.6"></a>Exercises</h5>
<a 
 id="dx1-32001"></a>
<!--l. 610--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-32003x1">Center the map on Greenwich.
   </li>
   <li 
  class="enumerate" id="x1-32005x2">Add a map scale with <span 
class="pcrb8t-">-L</span>.
   </li></ol>
<a 
 id="dx1-32006"></a>
                                                                                 

                                                                                 
   <h2 class="chapterHead"><span class="titlemark">Chapter&#x00A0;2</span><br /><a 
 id="x1-330002"></a>SESSION TWO</h2>
   <h3 class="sectionHead"><span class="titlemark">2.1    </span> <a 
 id="x1-340002.1"></a>General Information</h3>
<!--l. 624--><p class="noindent" >There are 18 <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;programs that directly create (or add overlays to) plots (Table&#x00A0;<a 
href="#x1-34019r1">2.1<!--tex4ht:ref: tbl:plotprogs --></a>); the remaining 45 are
mostly concerned with data processing. This session will focus on the task of plotting lines, symbols, and text on
maps. We will build on the skills we acquired while familiarizing ourselves with the various <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;map
projections as well as how to select a data domain and boundary annotations.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 632--><p class="indent" >   <a 
 id="x1-34019r1"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-3" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-3-1g"><col 
id="TBL-3-1" /></colgroup><colgroup id="TBL-3-2g"><col 
id="TBL-3-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-3-1-1"  
class="td11">  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Program</span></div>  </td><td  style="text-align:center; white-space:nowrap;" id="TBL-3-1-2"  
class="td11">                                                         <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-2-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-2-1"  
class="td11">                                                              <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">BASEMAPS</span></div></td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-3-1"  
class="td11"><a 
href="../html/man/psbasemap.html" ><span 
class="phvb8t-x-x-90">psbasemap</span></a><a 
 id="dx1-34001"></a> </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Create an empty basemap frame with optional scale                                                                                                                                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-4-1"  
class="td11"><a 
href="../html/man/pscoast.html" ><span 
class="phvb8t-x-x-90">pscoast</span></a><a 
 id="dx1-34002"></a>        </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot coastlines, filled continents, rivers, and political borders                                                                                                                                                                                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-5-1"  
class="td11"><a 
href="../html/man/pslegend.html" ><span 
class="phvb8t-x-x-90">pslegend</span></a><a 
 id="dx1-34003"></a>      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Create legend overlay                                                                                                                                                                                                                                                             </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-6-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-6-1"  
class="td11">                                                           <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">POINTS AND LINES</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-7-1"  
class="td11"><a 
href="../html/man/pswiggle.html" ><span 
class="phvb8t-x-x-90">pswiggle</span></a><a 
 id="dx1-34004"></a>      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw spatial time-series along their </span><!--l. 642--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mrow ><mo 
class="MathClass-open">(</mo><mrow><mi 
>x</mi><mo 
class="MathClass-punc">,</mo><mi 
>y</mi></mrow><mo 
class="MathClass-close">)</mo></mrow></math><span 
class="ptmr8t-x-x-90">-tracks                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-8-1"  
class="td11"><a 
href="../html/man/psxy.html" ><span 
class="phvb8t-x-x-90">psxy</span></a><a 
 id="dx1-34005"></a>             </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot symbols, polygons, and lines in 2-D                                                                                                                                                                                                                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-9-1"  
class="td11"><a 
href="../html/man/psxyz.html" ><span 
class="phvb8t-x-x-90">psxyz</span></a><a 
 id="dx1-34006"></a>            </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot symbols, polygons, and lines in 3-D                                                                                                                                                                                                                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-10-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-10-1"  
class="td11">                                                             <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">HISTOGRAMS</span></div></td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-11-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-11-1"  
class="td
11"><a 
href="../html/man/pshistogram.html" ><span 
class="phvb8t-x-x-90">pshistogram</span></a><a 
 id="dx1-34007"></a></td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-11-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot a rectangular histogram                                                                                                                                                                                                                                                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-12-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-12-1"  
class="td11"><a 
href="../html/man/psrose.html" ><span 
class="phvb8t-x-x-90">psrose</span></a><a 
 id="dx1-34008"></a>          </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-12-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot a polar histogram(sector/rose diagram)                                                                                                                                                                                                                           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-13-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-13-1"  
class="td11">                                                              <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">CONTOURS</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-14-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-14-1"  
class="td11"><a 
href="../html/man/grdcontour.html" ><span 
class="phvb8t-x-x-90">grdcontour</span></a><a 
 id="dx1-34009"></a>  </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-14-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Contouring of 2-D gridded data sets                                                                                                                                                                                                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-15-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-15-1"  
class="td11"><a 
href="../html/man/pscontour.html" ><span 
class="phvb8t-x-x-90">pscontour</span></a><a 
 id="dx1-34010"></a>    </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-15-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Direct contouring or imaging of </span><!--l. 650--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>x</mi><mi 
>y</mi><mi 
>z</mi></math> <span 
class="ptmr8t-x-x-90">data by optimal triangulation</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-16-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-16-1"  
class="td11">                                                              <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">SURFACES</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-17-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-17-1"  
class="td11"><a 
href="../html/man/grdimage.html" ><span 
class="phvb8t-x-x-90">grdimage</span></a><a 
 id="dx1-34011"></a>     </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-17-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Produce color images from 2-D gridded data                                                                                                                                                                                                                         </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-18-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-18-1"  
class="td11"><a 
href="../html/man/grdvector.html" ><span 
class="phvb8t-x-x-90">grdvector</span></a><a 
 id="dx1-34012"></a>     </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-18-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot vector fields from 2-D gridded data                                                                                                                                                                                                                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-19-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-19-1"  
class="td11"><a 
href="../html/man/grdview.html" ><span 
class="phvb8t-x-x-90">grdview</span></a><a 
 id="dx1-34013"></a>        </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-19-2"  
class="td11"><span 
class="ptmr8t-x-x-90">3-D perspective imaging of 2-D gridded data                                                                                                                                                                                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-20-"><td colspan="2" style="text-align:center; white-space:nowrap;" id="TBL-3-20-1"  
class="td11">                                                              <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">UTILITIES</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-21-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-21-1"  
class="td11"><a 
href="../html/man/psclip.html" ><span 
class="phvb8t-x-x-90">psclip</span></a><a 
 id="dx1-34014"></a>           </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-21-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Use polygon files to initiate custom clipping paths                                                                                                                                                                                                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-22-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-22-1"  
class="td11"><a 
href="../html/man/psimage.html" ><span 
class="phvb8t-x-x-90">psimage</span></a><a 
 id="dx1-34015"></a>       </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-22-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot Sun raster files                                                                                                                                                                                                                                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-23-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-23-1"  
class="td11"><a 
href="../html/man/psmask.html" ><span 
class="phvb8t-x-x-90">psmask</span></a><a 
 id="dx1-34016"></a>        </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-23-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Create clipping paths or generate overlay to mask                                                                                                                                                                                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-24-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-24-1"  
class="td11"><a 
href="../html/man/psscale.html" ><span 
class="phvb8t-x-x-90">psscale</span></a><a 
 id="dx1-34017"></a>        </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-24-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot gray scale or color scale bar                                                                                                                                                                                                                                            </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-25-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-25-1"  
class="td11"><a 
href="../html/man/pstext.html" ><span 
class="phvb8t-x-x-90">pstext</span></a><a 
 id="dx1-34018"></a>           </td><td  style="text-align:left; white-space:nowrap;" id="TBL-3-25-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Plot text strings on maps                                                                                                                                                                                                                                                         </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-3-26-"><td  style="text-align:left; white-space:nowrap;" id="TBL-3-26-1"  
class="td11">          </td></tr></table>
</div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;2.1: </span><span  
class="content">List of all 1-D and 2-D plotting programs in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>.</span></div><!--tex4ht:label?: x1-34019r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 666--><p class="indent" >   Plotting lines and symbols, <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-34020"></a> is one of the most frequently used programs in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>. In addition to the
common command line switches it has numerous specific options, and expects different file formats depending on
what action has been selected. These circumstances make <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-34021"></a> harder to master than most <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;tools. Table&#x00A0;<a 
href="#x1-34022r2">2.2<!--tex4ht:ref: tbl:psxy --></a>
shows a complete list of the options.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 673--><p class="indent" >   <a 
 id="x1-34022r2"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-4" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-4-1g"><col 
id="TBL-4-1" /></colgroup><colgroup id="TBL-4-2g"><col 
id="TBL-4-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-4-1-1"  
class="td11">                                                                                    <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>                                                                                      </td><td  style="text-align:center; white-space:nowrap;" id="TBL-4-1-2"  
class="td11">                                                         <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-A                                                                                                                                                                           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Suppress line interpolation along great circles                                                                                                                                                                                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">cpt                                                                                                                                                                                                                                                                                                                                                                                                                      </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Let symbol color be determined from </span><!--l. 679--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math><span 
class="ptmr8t-x-x-90">-values and the </span><span 
class="ptmri8t-x-x-90">cpt </span><span 
class="ptmr8t-x-x-90">file</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-E</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">x</span><!--l. 680--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">X</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmb8t-x-x-90">y</span><!--l. 680--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">Y</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmri8t-x-x-90">cap</span><span 
class="ptmr8t-x-x-90">][/</span><span 
class="ptmri8t-x-x-90">pen</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw selected error bars with specified attributes                                                                                                                                                                                                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-G</span><span 
class="ptmri8t-x-x-90">fill                                                                                                                                                                                                                                                                                                                                                                                                                      </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set color for symbol or fill for polygons                                                                                                                                                                                                                              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-L                                                                                                                                                                           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Explicitly close polygons                                                                                                                                                                                                                                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N                                                                                                                                                                           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Do Not clip symbols at map borders                                                                                                                                                                                                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S[symbol]</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">size</span><span 
class="ptmr8t-x-x-90">]                                                                                                                                                                                                                                                                                                                                                                                               </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Select one of several symbols (See Table</span><span 
class="ptmr8t-x-x-90">&#x00A0;</span><a 
href="#x1-34026r3"><span 
class="ptmr8t-x-x-90">2.3</span><!--tex4ht:ref: tbl:psxysymbols --></a><span 
class="ptmr8t-x-x-90">)                                                                                                                                                                                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-9-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmri8t-x-x-90">pen                                                                                                                                                                                                                                                                                                                                                                                                                     </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set </span><span 
class="ptmri8t-x-x-90">pen </span><span 
class="ptmr8t-x-x-90">for line or symbol outline                                                                                                                                                                                                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-10-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-10-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-m</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">flag</span><span 
class="ptmr8t-x-x-90">]                                                                                                                                                                                                                                                                                                                                                                                                                  </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-4-10-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Multiple segment input data; headers start with </span><span 
class="ptmri8t-x-x-90">flag                                                                                                                                                                                                           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-4-11-"><td  style="text-align:left; white-space:nowrap;" id="TBL-4-11-1"  
class="td11">                                                                                                                                                                             </td></tr></table>
</div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;2.2: </span><span  
class="content">Optional switches in the <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-34023"></a> program.</span></div><!--tex4ht:label?: x1-34022r2 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 692--><p class="indent" >   The symbols can either be transparent (using <span 
class="pcrb8t-">-W </span>only, not <span 
class="pcrb8t-">-G</span>) or solid (<span 
class="pcrb8t-">-G</span>, with optional outline using <span 
class="pcrb8t-">-W</span>).
The <span 
class="pcrb8t-">-S </span>option takes the code for the desired symbol and optional size information. If no symbol is given it is
expected to be given in the last column of each record in the input file. The <span 
class="ptmri8t-">size </span>is optional since individual sizes
for symbols may also be provided by the input data. The main symbols available to us are shown in
Table&#x00A0;<a 
href="#x1-34026r3">2.3<!--tex4ht:ref: tbl:psxysymbols --></a>.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 700--><p class="indent" >   <a 
 id="x1-34026r3"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<a 
 id="dx1-34024"></a>
<a 
 id="dx1-34025"></a>
<div class="tabular"> <table id="TBL-5" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-5-1g"><col 
id="TBL-5-1" /></colgroup><colgroup id="TBL-5-2g"><col 
id="TBL-5-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-5-1-1"  
class="td11">        <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>         </td><td  style="text-align:center; white-space:nowrap;" id="TBL-5-1-2"  
class="td11">                       <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Symbol</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S-</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">horizontal dash; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is length of dash                                                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sa</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">st</span><span 
class="ptmb8t-x-x-90">a</span><span 
class="ptmr8t-x-x-90">r; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is radius of circumscribing circle                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sb</span><span 
class="ptmri8t-x-x-90">size</span><span 
class="ptmr8t-x-x-90">[/</span><span 
class="ptmri8t-x-x-90">base</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmb8t-x-x-90">u</span><span 
class="ptmr8t-x-x-90">]                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-4-2"  
class="td11"><span 
class="ptmb8t-x-x-90">b</span><span 
class="ptmr8t-x-x-90">ar; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is bar width, append </span><span 
class="ptmb8t-x-x-90">u </span><span 
class="ptmr8t-x-x-90">if </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is in </span><span 
class="ptmri8t-x-x-90">x</span><span 
class="ptmr8t-x-x-90">-units                                            </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-5-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Bar extends from </span><span 
class="ptmri8t-x-x-90">base </span><span 
class="ptmr8t-x-x-90">[0] to the </span><span 
class="ptmri8t-x-x-90">y</span><span 
class="ptmr8t-x-x-90">-value                                                            </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sc</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-6-2"  
class="td11"><span 
class="ptmb8t-x-x-90">c</span><span 
class="ptmr8t-x-x-90">ircle; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is the diameter                                                                                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sd</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-7-2"  
class="td11"><span 
class="ptmb8t-x-x-90">d</span><span 
class="ptmr8t-x-x-90">iamond; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Se                   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-8-2"  
class="td11"><span 
class="ptmb8t-x-x-90">e</span><span 
class="ptmr8t-x-x-90">llipse; </span><span 
class="ptmri8t-x-x-90">direction </span><span 
class="ptmr8t-x-x-90">(CCW from horizontal), </span><span 
class="ptmri8t-x-x-90">major</span><span 
class="ptmr8t-x-x-90">, and </span><span 
class="ptmri8t-x-x-90">minor </span><span 
class="ptmr8t-x-x-90">axes in inches     </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-9-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">are read from the input file                                                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-10-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-10-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-SE                   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-10-2"  
class="td11"><span 
class="ptmb8t-x-x-90">e</span><span 
class="ptmr8t-x-x-90">llipse; </span><span 
class="ptmri8t-x-x-90">azimuth </span><span 
class="ptmr8t-x-x-90">(CW from vertical), </span><span 
class="ptmri8t-x-x-90">major</span><span 
class="ptmr8t-x-x-90">, and </span><span 
class="ptmri8t-x-x-90">minor </span><span 
class="ptmr8t-x-x-90">axes in kilometers       </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-11-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-11-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-11-2"  
class="td11"><span 
class="ptmr8t-x-x-90">are read from the input file                                                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-12-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-12-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sg</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-12-2"  
class="td11"><span 
class="ptmr8t-x-x-90">octa</span><span 
class="ptmb8t-x-x-90">g</span><span 
class="ptmr8t-x-x-90">on; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-13-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-13-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sh</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-13-2"  
class="td11"><span 
class="ptmb8t-x-x-90">h</span><span 
class="ptmr8t-x-x-90">exagon; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-14-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-14-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Si</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-14-2"  
class="td11"><span 
class="ptmb8t-x-x-90">i</span><span 
class="ptmr8t-x-x-90">nverted triangle; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                          </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-15-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-15-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sk</span><span 
class="ptmri8t-x-x-90">symbol</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">size                          </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-15-2"  
class="td11"><span 
class="ptmb8t-x-x-90">k</span><span 
class="ptmr8t-x-x-90">ustom symbol; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-16-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-16-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sl</span><span 
class="ptmri8t-x-x-90">size</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">string</span><span 
class="ptmr8t-x-x-90">[%</span><span 
class="ptmri8t-x-x-90">font</span><span 
class="ptmr8t-x-x-90">]                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-16-2"  
class="td11"><span 
class="ptmb8t-x-x-90">l</span><span 
class="ptmr8t-x-x-90">etter; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is fontsize. Append a letter or text string, and optionally a font       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-17-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-17-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sn</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-17-2"  
class="td11"><span 
class="ptmr8t-x-x-90">pe</span><span 
class="ptmb8t-x-x-90">n</span><span 
class="ptmr8t-x-x-90">tagon; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-18-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-18-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sp                   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-18-2"  
class="td11"><span 
class="ptmb8t-x-x-90">p</span><span 
class="ptmr8t-x-x-90">oint; no size needed (1 pixel at current resolution is used)                              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-19-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-19-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sr</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-19-2"  
class="td11"><span 
class="ptmb8t-x-x-90">r</span><span 
class="ptmr8t-x-x-90">ect, </span><span 
class="ptmri8t-x-x-90">width </span><span 
class="ptmr8t-x-x-90">and </span><span 
class="ptmri8t-x-x-90">height </span><span 
class="ptmr8t-x-x-90">are read from input file                                                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-20-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-20-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Ss</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-20-2"  
class="td11"><span 
class="ptmb8t-x-x-90">s</span><span 
class="ptmr8t-x-x-90">quare, </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                          </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-21-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-21-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-St</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-21-2"  
class="td11"><span 
class="ptmb8t-x-x-90">t</span><span 
class="ptmr8t-x-x-90">riangle; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is its side                                                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-22-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-22-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sv</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">thick</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">length</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">width</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmb8t-x-x-90">n</span><span 
class="ptmri8t-x-x-90">norm</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-22-2"  
class="td11"><span 
class="ptmb8t-x-x-90">v</span><span 
class="ptmr8t-x-x-90">ector; </span><span 
class="ptmri8t-x-x-90">direction </span><span 
class="ptmr8t-x-x-90">(CCW from horizontal) and </span><span 
class="ptmri8t-x-x-90">length </span><span 
class="ptmr8t-x-x-90">are read from input data  </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-23-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-23-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-23-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Optionally, append the thickness of the vector and the width and length of the</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-24-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-24-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-24-2"  
class="td11"><span 
class="ptmr8t-x-x-90">arrow-head. If the </span><span 
class="ptmb8t-x-x-90">n</span><span 
class="ptmri8t-x-x-90">norm </span><span 
class="ptmr8t-x-x-90">is appended, all vectors whose lengths are less than </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-25-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-25-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-25-2"  
class="td11"><span 
class="ptmri8t-x-x-90">norm </span><span 
class="ptmr8t-x-x-90">will have their attributes scaled by length/</span><span 
class="ptmri8t-x-x-90">norm                                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-26-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-26-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-SV</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">thick</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">length</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">width</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmb8t-x-x-90">n</span><span 
class="ptmri8t-x-x-90">norm</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-26-2"  
class="td11"><span 
class="ptmb8t-x-x-90">v</span><span 
class="ptmr8t-x-x-90">ector, except </span><span 
class="ptmri8t-x-x-90">azimuth </span><span 
class="ptmr8t-x-x-90">(degrees east of north) is expected instead of </span><span 
class="ptmri8t-x-x-90">direction </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-27-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-27-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-27-2"  
class="td11"><span 
class="ptmr8t-x-x-90">The angle on the map is calculated based on the chosen map projection          </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-28-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-28-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sw</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">size                                     </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-28-2"  
class="td11"><span 
class="ptmr8t-x-x-90">pie </span><span 
class="ptmb8t-x-x-90">w</span><span 
class="ptmr8t-x-x-90">edge; </span><span 
class="ptmri8t-x-x-90">start </span><span 
class="ptmr8t-x-x-90">and </span><span 
class="ptmri8t-x-x-90">stop </span><span 
class="ptmr8t-x-x-90">directions (CCW from horizontal) are read from      </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-5-29-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-29-1"  
class="td11">                      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-29-2"  
class="td11"><span 
class="ptmr8t-x-x-90">input data                                                                                                            </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-30-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-30-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sx</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-30-2"  
class="td11"><span 
class="ptmr8t-x-x-90">cross; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is length of crossing lines                                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-31-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-31-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Sy</span><span 
class="ptmri8t-x-x-90">size                                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-5-31-2"  
class="td11"><span 
class="ptmr8t-x-x-90">vertical dash; </span><span 
class="ptmri8t-x-x-90">size </span><span 
class="ptmr8t-x-x-90">is length of dash                                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-5-32-"><td  style="text-align:left; white-space:nowrap;" id="TBL-5-32-1"  
class="td11">                      </td></tr></table></div>
<br /> <div class="caption" 
><span class="id">Table&#x00A0;2.3: </span><span  
class="content">The symbol option in <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-34027"></a>. Lower case symbols (<span 
class="ptmb8t-">a, c, d, g, h, i, n, s, t, x</span>) will fit inside a
circle of given diameter. Upper case symbols (<span 
class="ptmb8t-">A, C, D, G, H, I, N, S, T, X</span>) will have area equal to that of
a circle of given diameter.</span></div><!--tex4ht:label?: x1-34026r3 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 743--><p class="indent" >   Because some symbols require more input data than others, and because the size of symbols as well as their
color can be determined from the input data, the format of data can be confusing. The general format for the input
data is (optional items are in brackets []): <br 
class="newline" /><a 
 id="dx1-34028"></a>
</p><!--l. 749--><p class="indent" >   <!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>x</mi><mstyle 
class="mbox"><mtext  >&#x00A0;</mtext></mstyle><mi 
>y</mi></math> [
<!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math> ] [
<!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>s</mi><mi 
>i</mi><mi 
>z</mi><mi 
>e</mi></math> ] [
<!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>&#x03C3;</mi></mrow><mrow 
><mi 
>x</mi></mrow></msub 
></math> ] [
<!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>&#x03C3;</mi></mrow><mrow 
><mi 
>y</mi></mrow></msub 
></math> ] [
<!--l. 749--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>s</mi><mi 
>y</mi><mi 
>m</mi><mi 
>b</mi><mi 
>o</mi><mi 
>l</mi></math> ]
<br 
class="newline" />
</p><!--l. 751--><p class="indent" >   Thus, the only required input columns are the first two which must contain the longitude and
latitude (or <span 
class="ptmri8t-">x </span>and <span 
class="ptmri8t-">y</span>). The remaining items apply when one (or more) of the following conditions are
met:
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-34030x1">If you want the color of each symbol to be determined individually, supply a cptfile with the <span 
class="pcrb8t-">-C </span>option
   and let the 3rd data column contain the <span 
class="ptmri8t-">z</span>-values to be used with the cptfile.
   </li>
   <li 
  class="enumerate" id="x1-34032x2">If you want the size of each symbol to be determined individually, append the size in a separate column.
   </li>
   <li 
  class="enumerate" id="x1-34034x3">To draw error bars, use the <span 
class="pcrb8t-">-E </span>option and give one or two additional data columns with the <span 
class="ptmr8c-">±</span>dx and
   <span 
class="ptmr8c-">±</span>dy values; the form of <span 
class="pcrb8t-">-E </span>determines if one (<span 
class="pcrb8t-">-Ex </span>or <span 
class="pcrb8t-">-Ey</span>) or two (<span 
class="pcrb8t-">-Exy</span>) columns are needed. If
   upper  case  flags  <span 
class="ptmb8t-">X  </span>or  <span 
class="ptmb8t-">Y  </span>are  given  then  we  will  instead  draw  a  &#8220;box-and-whisker&#8221;  symbol  and  the
   <!--l. 768--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>&#x03C3;</mi></mrow><mrow 
><mi 
>x</mi></mrow></msub 
></math>
   (or <!--l. 769--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>&#x03C3;</mi></mrow><mrow 
><mi 
>y</mi></mrow></msub 
></math>)
   must represent 4 columns containing the minimum, the 25 and 75% quartiles, and the maximum value.
   The given <!--l. 770--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>x</mi></math>
   (or <!--l. 770--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>y</mi></math>)
   coordinate is taken as the 50% quartile (median). <a 
 id="dx1-34035"></a>
   </li>
   <li 
  class="enumerate" id="x1-34037x4">If you draw vectors with <span 
class="pcrb8t-">-Sv </span>(or <span 
class="pcrb8t-">-SV</span>) then <span 
class="ptmri8t-">size </span>is actually two columns containing the <span 
class="ptmri8t-">direction </span>(or
   <span 
class="ptmri8t-">azimuth</span>) and <span 
class="ptmri8t-">length </span>of each vector. <a 
 id="dx1-34038"></a>
   </li>
   <li 
  class="enumerate" id="x1-34040x5">If you draw ellipses (<span 
class="pcrb8t-">-Se</span>) then <span 
class="ptmri8t-">size </span>is actually three columns containing the <span 
class="ptmri8t-">direction </span>and the <span 
class="ptmri8t-">major</span>
   and <span 
class="ptmri8t-">minor </span>axes in plot units (with <span 
class="pcrb8t-">-SE </span>we expect <span 
class="ptmri8t-">azimuth </span>instead and axes lengths in km). <a 
 id="dx1-34041"></a>
   </li></ol>
<!--l. 787--><p class="indent" >   Before we try some examples we need to review two key switches; they specify pen attributes and symbol or
polygon fill. Please consult Chapter 4 in the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;Technical Reference and Cookbook before experimenting with
the examples below.
</p>
   <h4 class="subsectionHead"><span class="titlemark">2.1.1    </span> <a 
 id="x1-350002.1.1"></a>Examples</h4>
<a 
 id="dx1-35001"></a>
<!--l. 795--><p class="noindent" >We will start off using the file <span class="underline">data</span> in your directory. Using the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;utility <a 
href="../html/man/minmax.html" ><span 
class="phvb8t-">minmax</span></a><a 
 id="dx1-35002"></a> we find the extent of the
data region:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-11">
minmax&#x00A0;data
</div>
<!--l. 801--><p class="nopar" >
</p><!--l. 804--><p class="noindent" >which returns
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-12">
data:&#x00A0;N&#x00A0;=&#x00A0;7&#x00A0;&#x00A0;&#x00A0;&#x003C;1/5&#x003E;&#x00A0;&#x00A0;&#x00A0;&#x003C;1/5&#x003E;
</div>
<!--l. 809--><p class="nopar" >
</p><!--l. 812--><p class="noindent" >telling us that the file <span class="underline">data</span> has 7 records and gives the minimum and maximum values for the first
two columns. Given our knowledge of how to set up linear projections with <span 
class="pcrb8t-">-R </span>and <span 
class="pcrb8t-">-JX</span>, try the
following:
</p><!--l. 818--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-35004x1">Plot the data as transparent circles of size 0.3 inches.
   </li>
   <li 
  class="enumerate" id="x1-35006x2">Plot the data as solid white circles instead.
   </li>
   <li 
  class="enumerate" id="x1-35008x3">Plot the data using 0.5" stars, making them red with a thick (width = 1.5p), dashed pen.
   </li></ol>
<!--l. 829--><p class="indent" >   To simply plot the data as a line we choose no symbol and specify a pen thickness instead:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-13">
psxy&#x00A0;data&#x00A0;-R&#x00A0;-J&#x00A0;-P&#x00A0;-B&#x00A0;-Wthinner&#x00A0;&#x003E;&#x00A0;plot.ps
</div>
<!--l. 833--><p class="nopar" ><a 
 id="dx1-35009"></a>
</p><!--l. 837--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">2.1.2    </span> <a 
 id="x1-360002.1.2"></a>Exercises</h4>
<a 
 id="dx1-36001"></a>
<!--l. 840--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-36003x1">Plot the data as a green-blue polygon instead.
   </li>
   <li 
  class="enumerate" id="x1-36005x2">Try using a predefined pattern.
   </li></ol>
<a 
 id="dx1-36006"></a>
<!--l. 849--><p class="noindent" >A common question is : &#8220;How can I plot symbols connected by a line with psxy?&#8221;. The surprising answer is that we
must call <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-36007"></a> twice. While this sounds cumbersome there is a reason for this: Basically, polygons need to be kept
in memory since they may need to be clipped, hence computer memory places a limit on how large polygons we
may plot. Symbols, on the other hand, can be plotted one at the time so there is no limit to how many
symbols one may plot. Therefore, to connect symbols with a line we must use the overlay approach:
<a 
 id="dx1-36008"></a>
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-14">
psxy&#x00A0;data&#x00A0;-R&#x00A0;-J&#x00A0;-B&#x00A0;-P&#x00A0;-K&#x00A0;-Wthinner&#x00A0;&#x003E;&#x00A0;plot.ps
&#x00A0;<br />psxy&#x00A0;data&#x00A0;-R&#x00A0;-J&#x00A0;-O&#x00A0;-W&#x00A0;-Si0.2i&#x00A0;&#x003E;&#x003E;&#x00A0;plot.ps
</div>
<!--l. 862--><p class="nopar" >
</p><!--l. 865--><p class="indent" >   Our final <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-36009"></a> example involves a more complicated scenario in which we want to plot the epicenters of
several earthquakes over the background of a coastline basemap. We want the symbols to have a size that reflects
the magnitude of the earthquakes, and that their color should reflect the depth of the hypocenter. You will find the
two files <span class="underline">quakes.ngdc</span> and <span class="underline">quakes.cpt</span> in your directory. The first few lines in the <span class="underline">quakes.ngdc</span> looks like
this:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-15">
&#x00A0;<br />Historical&#x00A0;Tsunami&#x00A0;Earthquakes&#x00A0;from&#x00A0;the&#x00A0;NGDC&#x00A0;Database
&#x00A0;<br />Year&#x00A0;&#x00A0;Mo&#x00A0;&#x00A0;Da&#x00A0;&#x00A0;Lat+N&#x00A0;&#x00A0;Long+E&#x00A0;&#x00A0;Dep&#x00A0;&#x00A0;Mag
&#x00A0;<br />1987&#x00A0;&#x00A0;01&#x00A0;&#x00A0;04&#x00A0;&#x00A0;49.77&#x00A0;&#x00A0;149.29&#x00A0;&#x00A0;489&#x00A0;&#x00A0;4.1
&#x00A0;<br />1987&#x00A0;&#x00A0;01&#x00A0;&#x00A0;09&#x00A0;&#x00A0;39.90&#x00A0;&#x00A0;141.68&#x00A0;&#x00A0;067&#x00A0;&#x00A0;6.8
</div>
<!--l. 880--><p class="nopar" >
</p><!--l. 883--><p class="indent" >   Thus the file has three header records (including the blank line), but we are only interested in columns 5, 4, 6,
and 7. In addition to extract those columns we must also scale the magnitudes into symbols sizes in inches. Given
their range it looks like multiplying the magnitude by 0.02 will work well. Reformatting this file to
comply with the <a 
href="../html/man/psxy.html" ><span 
class="phvb8t-">psxy</span></a><a 
 id="dx1-36010"></a> input format can be done in a number of ways, including manual editing, using
MATLAB, a spreadsheet program, or <span 
class="ptmri8t-">UNIX</span>&#x00A0;tools. Here, without further elaboration, we simply use
the <span 
class="ptmri8t-">UNIX</span>&#x00A0;tool <span 
class="ptmbo8t-">awk</span><a 
 id="dx1-36011"></a> to do the job ($5 refers to the 5&#8217;th column etc., and NR is the current record
number):
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-16">
awk&#x00A0;&#8217;{if&#x00A0;(NR&#x00A0;&#x003E;&#x00A0;3)&#x00A0;print&#x00A0;$5,&#x00A0;$4,&#x00A0;$6,&#x00A0;0.02*$7}&#8217;&#x00A0;quakes.ngdc&#x00A0;&#x003E;&#x00A0;quakes.d
</div>
<!--l. 896--><p class="nopar" >
</p><!--l. 899--><p class="indent" >   The <span 
class="ptmbo8t-">awk</span><a 
 id="dx1-36012"></a> statement is automatically applied to each record, hence the output file <span class="underline">quakes.d</span> should now look like
this (try it!):
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-17">
149.29&#x00A0;&#x00A0;49.77&#x00A0;&#x00A0;489&#x00A0;&#x00A0;0.082
&#x00A0;<br />141.68&#x00A0;&#x00A0;39.90&#x00A0;&#x00A0;067&#x00A0;&#x00A0;0.136
&#x00A0;<br />...etc&#x00A0;etc
</div>
<!--l. 906--><p class="nopar" >
</p><!--l. 909--><p class="indent" >   We will follow conventional color schemes for seismicity and assign red to shallow quakes (depth
0&#8211;100 km), green to intermediate quakes (100&#8211;300 km), and blue to deep earthquakes (depth
<!--l. 911--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" > <mo 
class="MathClass-rel">&#x003E;</mo></math> 300
km). The <span class="underline">quakes.cpt</span> file establishes the relationship between depth and color:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-18">
#&#x00A0;color&#x00A0;palette&#x00A0;for&#x00A0;seismicity
&#x00A0;<br />#z0&#x00A0;&#x00A0;color&#x00A0;&#x00A0;&#x00A0;z1&#x00A0;color
&#x00A0;<br />0&#x00A0;&#x00A0;&#x00A0;&#x00A0;red&#x00A0;&#x00A0;&#x00A0;&#x00A0;100&#x00A0;red
&#x00A0;<br />100&#x00A0;&#x00A0;green&#x00A0;&#x00A0;300&#x00A0;green
&#x00A0;<br />300&#x00A0;&#x00A0;blue&#x00A0;&#x00A0;1000&#x00A0;blue
</div>
<!--l. 921--><p class="nopar" >
</p><!--l. 924--><p class="indent" >   Apart from comment lines (starting with #), each record in the cpt file governs the color of a symbol whose <span 
class="ptmri8t-">z </span>value falls in
the range between <!--l. 926--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>z</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
></math>
and <!--l. 926--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msub><mrow 
><mi 
>z</mi></mrow><mrow 
><mn>1</mn></mrow></msub 
></math>. If
the colors for the lower and upper levels differ then an intermediate color will be linearly interpolated given the
<!--l. 927--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math> value.
Here, we have chosen constant color intervals.
</p><!--l. 930--><p class="indent" >   We may now complete our example using the Mercator projection; we throw in a map scale out of pure
generosity:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-19">
pscoast&#x00A0;-R130/150/35/50&#x00A0;-JM6i&#x00A0;-B5&#x00A0;-P&#x00A0;-Ggray&#x00A0;-Lf134/49/42.5/500&#x00A0;-K&#x00A0;&#x003E;&#x00A0;map.ps
&#x00A0;<br />psxy&#x00A0;-R&#x00A0;-J&#x00A0;-O&#x00A0;-Cquakes.cpt&#x00A0;quakes.d&#x00A0;-Sci&#x00A0;-Wthinnest&#x00A0;&#x003E;&#x003E;&#x00A0;map.ps
</div>
<!--l. 936--><p class="nopar" >
</p><!--l. 939--><p class="noindent" >where the <span 
class="ptmb8t-">i </span>appended to the <span 
class="pcrb8t-">-Sc </span>option ensures that symbols sizes are interpreted to be in inches.
</p>
   <h4 class="subsectionHead"><span class="titlemark">2.1.3    </span> <a 
 id="x1-370002.1.3"></a>More exercises</h4>
<!--l. 944--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-37002x1">Select another symbol.
   </li>
   <li 
  class="enumerate" id="x1-37004x2">Let the deep earthquakes be cyan instead of blue.
   </li></ol>
<!--l. 952--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">2.2    </span> <a 
 id="x1-380002.2"></a>Plotting text strings</h3>
<!--l. 954--><p class="noindent" >In many situations we need to annotate plots or maps with text strings; in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;this is done using <a 
href="../html/man/pstext.html" ><span 
class="phvb8t-">pstext</span></a><a 
 id="dx1-38001"></a>. Apart
from the common switches, there are 7 options that are particularly useful (Table&#x00A0;<a 
href="#x1-38002r4">2.4<!--tex4ht:ref: tbl:pstext --></a>).
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 958--><p class="indent" >   <a 
 id="x1-38002r4"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-6" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-6-1g"><col 
id="TBL-6-1" /></colgroup><colgroup id="TBL-6-2g"><col 
id="TBL-6-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-6-1-1"  
class="td11">   <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>   </td><td  style="text-align:center; white-space:nowrap;" id="TBL-6-1-2"  
class="td11">                   <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">dx</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">dy           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Spacing between text and the text box (see </span><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmr8t-x-x-90">)                             </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-D</span><span 
class="ptmri8t-x-x-90">dx</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">dy           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Offsets the projected location of the strings                                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-G</span><span 
class="ptmri8t-x-x-90">fill                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets the color of the text                                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-L        </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Lists the font ids and exits                                                              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N        </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Deactivates clipping at the borders                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S</span><span 
class="ptmri8t-x-x-90">pen              </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Selects outline font and sets pen attributes                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">fill</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmb8t-x-x-90">o</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmri8t-x-x-90">pen</span><span 
class="ptmr8t-x-x-90">]]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-6-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Paint the text box; draw the outline if </span><span 
class="ptmb8t-x-x-90">o </span><span 
class="ptmr8t-x-x-90">is appended (also see </span><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmr8t-x-x-90">)</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-6-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-6-9-1"  
class="td11">          </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;2.4: </span><span  
class="content">Some of the most frequently used options in <a 
href="../html/man/pstext.html" ><span 
class="phvb8t-">pstext</span></a><a 
 id="dx1-38003"></a>.</span></div><!--tex4ht:label?: x1-38002r4 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
   <hr class="figure" /><div class="figure" 
>
                                                                                 

                                                                                 
<a 
 id="x1-38004r1"></a>
                                                                                 

                                                                                 

<!--l. 975--><p class="noindent" ><img 
src="images/GMT_pstext_clearance.png" alt="PIC"  
 />
<br /> </p><div class="caption" 
><span class="id">Figure&#x00A0;2.1: </span><span  
class="content">Relationship between the text box and the extra clearance.</span></div><!--tex4ht:label?: x1-38004r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfigure" />
<!--l. 977--><p class="indent" >   The input data to <a 
href="../html/man/pstext.html" ><span 
class="phvb8t-">pstext</span></a><a 
 id="dx1-38005"></a> is expected to contain the following information: <br 
class="newline" /><a 
 id="dx1-38006"></a>
</p><!--l. 981--><p class="indent" >   <span 
class="ptmri8t-">x y size angle fontno justify text </span><br 
class="newline" />
</p><!--l. 983--><p class="indent" >   The <span 
class="ptmri8t-">size </span>argument is the font size in points, the <span 
class="ptmri8t-">angle </span>is the angle (measured counterclockwise) between the
text&#8217;s baseline and the horizontal, <span 
class="ptmri8t-">justify </span>indicates which point on the text-string should correspond to the given <span 
class="ptmri8t-">x, y</span>
location, and <span 
class="ptmri8t-">text </span>is the text string or sentence to plot. Figure&#x00A0;<a 
href="#x1-38009r2">2.2<!--tex4ht:ref: fig:GMT_pstext_justify --></a> illustrates these concepts and shows the relevant
two-character codes used for justification. <a 
 id="dx1-38007"></a><a 
 id="dx1-38008"></a>
</p>
   <hr class="figure" /><div class="figure" 
>
                                                                                 

                                                                                 
<a 
 id="x1-38009r2"></a>
                                                                                 

                                                                                 

<!--l. 992--><p class="noindent" ><img 
src="images/GMT_pstext_justify.png" alt="PIC"  
 />
<br /> </p><div class="caption" 
><span class="id">Figure&#x00A0;2.2: </span><span  
class="content">Justification (and corresponding character codes) for text strings.</span></div><!--tex4ht:label?: x1-38009r2 -->
                                                                                 

                                                                                 
   </div><hr class="endfigure" />
<!--l. 994--><p class="indent" >   The text string can be one or several words and may include octal codes for special characters and
escape-sequences used to select subscripts or symbol fonts. The escape sequences that are recognized by <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;are
given in Tables&#x00A0;<a 
href="#x1-38017r5">2.5<!--tex4ht:ref: tbl:escape --></a> and &#x00A0;<a 
href="#x1-38022r6">2.6<!--tex4ht:ref: tbl:scand --></a>. <a 
 id="dx1-38010"></a><a 
 id="dx1-38011"></a> <a 
 id="dx1-38012"></a><a 
 id="dx1-38013"></a> <a 
 id="dx1-38014"></a><a 
 id="dx1-38015"></a> <a 
 id="dx1-38016"></a>
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1006--><p class="indent" >   <a 
 id="x1-38017r5"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-7" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-7-1g"><col 
id="TBL-7-1" /></colgroup><colgroup id="TBL-7-2g"><col 
id="TBL-7-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-7-1-1"  
class="td11">  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Code</span></div>  </td><td  style="text-align:center; white-space:nowrap;" id="TBL-7-1-2"  
class="td11">                  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Effect</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-2-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@</span><span 
class="ptmr8t-x-x-90">&#x0303;               </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Turns symbol font on or off                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-3-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@+               </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Turns superscript on or off                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-4-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@-                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Turns subscript on or off                                                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-5-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@#               </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Turns small caps on or off                                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-6-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@_               </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Turns underline on or off                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-7-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@%</span><span 
class="ptmri8t-x-x-90">fontno</span><span 
class="ptmr8t-x-x-90">%</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Switches to another font; @%% resets to previous font       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-8-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@:</span><span 
class="ptmri8t-x-x-90">size</span><span 
class="ptmr8t-x-x-90">:         </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Switches to another font size; @:: resets to previous size    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-9-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@;</span><span 
class="ptmri8t-x-x-90">color</span><span 
class="ptmr8t-x-x-90">;      </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Switches to another font color; @;; resets to previous color</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-10-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-10-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@!                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-10-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Creates one composite character of the next two characters</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-11-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-11-1"  
class="td11"><span 
class="ptmr8t-x-x-90">@@             </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-7-11-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Prints the @ sign itself                                                          </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-7-12-"><td  style="text-align:left; white-space:nowrap;" id="TBL-7-12-1"  
class="td11">         </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;2.5: </span><span  
class="content"><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;text escape sequences.</span></div><!--tex4ht:label?: x1-38017r5 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1026--><p class="indent" >   Note that these escape sequences (as well as octal codes) can be used anywhere in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>  including in
arguments to the <span 
class="pcrb8t-">-B </span>option. A chart of octal codes can be found in Appendix F in the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;technical reference
book. For accented European characters you must set <span 
class="ptmb8t-">CHAR_ENCODING </span>to ISOLatin1 in your <span class="underline">.gmtdefaults4</span>
file.
</p><!--l. 1032--><p class="indent" >   We will demonstrate <a 
href="../html/man/pstext.html" ><span 
class="phvb8t-">pstext</span></a><a 
 id="dx1-38018"></a> with the following script:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-20">
cat&#x00A0;&#x003C;&#x003C;&#x00A0;EOF&#x00A0;|&#x00A0;pstext&#x00A0;-R0/7/0/5&#x00A0;-Jx1i&#x00A0;-P&#x00A0;-B1g1&#x00A0;-GDarkOrange&#x00A0;|&#x00A0;gv&#x00A0;-
&#x00A0;<br />1&#x00A0;&#x00A0;1&#x00A0;&#x00A0;30&#x00A0;&#x00A0;0&#x00A0;&#x00A0;4&#x00A0;&#x00A0;BL&#x00A0;It&#8217;s&#x00A0;P@al,&#x00A0;not&#x00A0;Pal!
&#x00A0;<br />1&#x00A0;&#x00A0;2&#x00A0;&#x00A0;30&#x00A0;&#x00A0;0&#x00A0;&#x00A0;4&#x00A0;&#x00A0;BL&#x00A0;Try&#x00A0;@%33%ZapfChancery@%%&#x00A0;today
&#x00A0;<br />1&#x00A0;&#x00A0;3&#x00A0;&#x00A0;30&#x00A0;&#x00A0;0&#x00A0;&#x00A0;4&#x00A0;&#x00A0;BL&#x00A0;@~D@~g@-b@-&#x00A0;=&#x00A0;2@~pr@~G@~D@~h.
&#x00A0;<br />1&#x00A0;&#x00A0;4&#x00A0;&#x00A0;30&#x00A0;&#x00A0;0&#x00A0;&#x00A0;4&#x00A0;&#x00A0;BL&#x00A0;University&#x00A0;of&#x00A0;Hawaii&#x00A0;at&#x00A0;M@!a\225noa
&#x00A0;<br />EOF
</div>
<!--l. 1041--><p class="nopar" >
<a 
 id="dx1-38019"></a>
</p><!--l. 1046--><p class="indent" >   Here we have used the &#8220;here document&#8221; notation in <span 
class="ptmri8t-">UNIX</span>: The
<!--l. 1046--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" > <mo 
class="MathClass-rel">&#x003C;</mo></math><!--l. 1046--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" > <mo 
class="MathClass-rel">&#x003C;</mo></math>
EOF will treat the following lines as the input file until it detects the word EOF. We pipe the <span 
class="ptmri8t-">PostScript</span>&#x00A0;directly
through <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-38020"></a> (the &#8211; tells <span 
class="ptmbo8t-">gv</span><a 
 id="dx1-38021"></a> that piping is happening).
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1051--><p class="indent" >   <a 
 id="x1-38022r6"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-8" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-8-1g"><col 
id="TBL-8-1" /></colgroup><colgroup id="TBL-8-2g"><col 
id="TBL-8-2" /></colgroup><colgroup id="TBL-8-3g"><col 
id="TBL-8-3" /></colgroup><colgroup id="TBL-8-4g"><col 
id="TBL-8-4" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-1-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-1-1"  
class="td11"><span 
class="ptmri8t-">Code</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-1-2"  
class="td11"><span 
class="ptmri8t-">Effect</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-1-3"  
class="td11"><span 
class="ptmri8t-">Code</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-1-4"  
class="td11"><span 
class="ptmri8t-">Effect</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-2-1"  
class="td11">@E   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-2-2"  
class="td11">Æ      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-2-3"  
class="td11">@e   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-2-4"  
class="td11">æ       </td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-3-1"  
class="td
11">@O   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-3-2"  
class="td11">Ø      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-3-3"  
class="td11">@o   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-3-4"  
class="td11">ø       </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-4-1"  
class="td11">@A   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-4-2"  
class="td11">Å      </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-4-3"  
class="td11">@a   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-4-4"  
class="td11">å        </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-5-1"  
class="td11">@C   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-5-2"  
class="td11">Ç     </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-5-3"  
class="td11">@c   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-5-4"  
class="td11">ç     </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-6-1"  
class="td11">@N   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-6-2"  
class="td11">Ñ     </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-6-3"  
class="td11">@n   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-6-4"  
class="td11">ñ     </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-7-1"  
class="td11">@U   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-7-2"  
class="td11">Ü     </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-7-3"  
class="td11">@u   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-7-4"  
class="td11">ü     </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-8-1"  
class="td11">@s    </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-8-2"  
class="td11">ß       </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-8-3"  
class="td11">    </td><td  style="text-align:left; white-space:nowrap;" id="TBL-8-8-4"  
class="td11">    </td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-8-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-8-9-1"  
class="td11">    </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;2.6: </span><span  
class="content">Shortcuts for some European characters.</span></div><!--tex4ht:label?: x1-38022r6 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
   <h3 class="sectionHead"><span class="titlemark">2.3    </span> <a 
 id="x1-390002.3"></a>Exercises</h3>
<a 
 id="dx1-39001"></a>
<!--l. 1070--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-39003x1">At <!--l. 1072--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>y</mi> <mo 
class="MathClass-rel">=</mo> <mn>5</mn></math>,
   add the sentence &#8220;<!--l. 1072--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><msup><mrow 
><mi 
>z</mi></mrow><mrow 
><mn>2</mn></mrow></msup 
> <mo 
class="MathClass-rel">=</mo> <msup><mrow 
><mi 
>x</mi></mrow><mrow 
><mn>2</mn></mrow></msup 
> <mo 
class="MathClass-bin">+</mo><msup><mrow 
><mi 
>y</mi></mrow><mrow 
><mn>2</mn></mrow></msup 
></math>&#8221;.
   </li>
   <li 
  class="enumerate" id="x1-39005x2">At <!--l. 1074--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>y</mi> <mo 
class="MathClass-rel">=</mo> <mn>6</mn></math>,
   add the sentence &#8220;It is 80<span 
class="ptmr8c-">°</span>&#x00A0;today&#8221;.
   </li></ol>
<a 
 id="dx1-39006"></a>
                                                                                 

                                                                                 
   <h2 class="chapterHead"><span class="titlemark">Chapter&#x00A0;3</span><br /><a 
 id="x1-400003"></a>SESSION THREE</h2>
   <h3 class="sectionHead"><span class="titlemark">3.1    </span> <a 
 id="x1-410003.1"></a>Contouring gridded data sets</h3>
<!--l. 1084--><p class="noindent" ><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;comes with several utilities that can create gridded data sets; we will discuss two such programs
later this session. First, we will assume that we already have gridded data sets. In the supplemental
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;archive there is a program that serves as a data extractor from several public domain global
gridded data sets. Among these data are ETOPO5, crustal ages, gravity and geoid, and DEM for the
continental US. Here, we will use <a 
href="../html/man/grdraster.html" ><span 
class="phvb8t-">grdraster</span></a><a 
 id="dx1-41001"></a> to extract a <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>-ready grid that we will next use for
contouring:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-21">
grdraster&#x00A0;1&#x00A0;-R-66/-60/30/35&#x00A0;-Gbermuda.nc&#x00A0;-V
</div>
<!--l. 1095--><p class="nopar" >
</p><!--l. 1098--><p class="indent" >   Here we use the file extension <span class="underline">.nc</span> instead of the generic <span class="underline">.grd</span> to indicate that this is a netCDF file. It is good
form, but not essential, to use <span class="underline">.nc</span> for netCDF grids. Using that extension will help other programs installed on your
system to recognize these files and might give it an identifiable icon in your file browser. Learn about other
programs that read netCDF files at the <a 
href="http://www.unidata.ucar.edu/software/netcdf/" >netCDF website</a> You can find <span class="underline">bermuda.nc</span> also in the <span class="underline">tutorial</span>
directory of you <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a> installation. Feel free to open it in any other program and compare results with
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>.
</p><!--l. 1108--><p class="indent" >   We first use the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;program <a 
href="../html/man/grdinfo.html" ><span 
class="phvb8t-">grdinfo</span></a><a 
 id="dx1-41002"></a> to see what&#8217;s in this file:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-22">
grdinfo&#x00A0;bermuda.nc
</div>
<!--l. 1112--><p class="nopar" >
</p><!--l. 1115--><p class="indent" >   The file contains bathymetry for the Bermuda region and has depth values from -5475 to -89 meters. We want
to make a contour map of this data; this is a job for <a 
href="../html/man/grdcontour.html" ><span 
class="phvb8t-">grdcontour</span></a><a 
 id="dx1-41003"></a>. As with previous plot commands we need to set
up the map projection with <span 
class="pcrb8t-">-J</span>. Here, however, we do not have to specify the region since that is by default
assumed to be the extent of the grid file. To generate any plot we will in addition need to supply information
about which contours to draw. Unfortunately, <a 
href="../html/man/grdcontour.html" ><span 
class="phvb8t-">grdcontour</span></a><a 
 id="dx1-41004"></a> is a complicated program with too many
options. We put a positive spin on this situation by touting its flexibility. Here are the most useful
options:
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1127--><p class="indent" >   <a 
 id="x1-41005r1"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-9" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-9-1g"><col 
id="TBL-9-1" /></colgroup><colgroup id="TBL-9-2g"><col 
id="TBL-9-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-9-1-1"  
class="td11">                                             <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>                                              </td><td  style="text-align:center; white-space:nowrap;" id="TBL-9-1-2"  
class="td11">                         <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-A</span><span 
class="ptmri8t-x-x-90">annot_int                                                                                                                                                                                                                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Annotation interval and attributes                                                                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">cont_int                                                                                                                                                                                                                   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Contour interval                                                                                                           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-G</span><span 
class="ptmri8t-x-x-90">gap                                                                                                                                                                                                                          </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Controls placement of contour annotations                                                                 </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-L</span><span 
class="ptmri8t-x-x-90">low</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">high                                                                                                                                                                                                                  </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Only draw contours within the </span><span 
class="ptmri8t-x-x-90">low </span><span 
class="ptmr8t-x-x-90">to </span><span 
class="ptmri8t-x-x-90">high </span><span 
class="ptmr8t-x-x-90">range                                                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Q</span><span 
class="ptmri8t-x-x-90">cut                                                                                                                                                                                                                           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Do not draw contours with fewer than </span><span 
class="ptmri8t-x-x-90">cut </span><span 
class="ptmr8t-x-x-90">points                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S</span><span 
class="ptmri8t-x-x-90">smooth                                                                                                                                                                                                                    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Resample contours every </span><span 
class="ptmri8t-x-x-90">x_inc</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">smooth </span><span 
class="ptmr8t-x-x-90">increment                                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-T</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">+</span><!--l. 1138--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">-</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmri8t-x-x-90">gap</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">length</span><span 
class="ptmr8t-x-x-90">][:</span><span 
class="ptmri8t-x-x-90">LH</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw tick-marks in downhill direction for innermost closed contours                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-9-1"  
class="td11">                                                                                               </td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-9-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Add tick spacing and length, and characters to plot at the center of closed contours.</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-10-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-10-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">a</span><!--l. 1140--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">c</span><span 
class="ptmr8t-x-x-90">]</span><span 
class="ptmri8t-x-x-90">pen                       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-10-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set contour and annotation pens                                                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-11-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-11-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Z</span><span 
class="ptmri8t-x-x-90">factor</span><span 
class="ptmr8t-x-x-90">[/</span><span 
class="ptmri8t-x-x-90">offset</span><span 
class="ptmr8t-x-x-90">]                                                                                                                                                                                                          </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-9-11-2"  
class="td11"><span 
class="ptmr8t-x-x-90">[Subtract </span><span 
class="ptmri8t-x-x-90">offset</span><span 
class="ptmr8t-x-x-90">] and multiply data by </span><span 
class="ptmri8t-x-x-90">factor </span><span 
class="ptmr8t-x-x-90">prior to processing                                </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-9-12-"><td  style="text-align:left; white-space:nowrap;" id="TBL-9-12-1"  
class="td11">                                                                                               </td></tr></table>
</div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;3.1: </span><span  
class="content">The most useful options in <a 
href="../html/man/grdcontour.html" ><span 
class="phvb8t-">grdcontour</span></a><a 
 id="dx1-41006"></a>.</span></div><!--tex4ht:label?: x1-41005r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1147--><p class="indent" >   We will first make a plain contour map using 1 km as annotation interval and 250 m as contour interval. We
choose a 7-inch-wide Mercator plot and annotate the borders every 2<span 
class="ptmr8c-">°</span>:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-23">
grdcontour&#x00A0;bermuda.nc&#x00A0;-JM7i&#x00A0;-C250&#x00A0;-A1000&#x00A0;-P&#x00A0;-B2&#x00A0;|&#x00A0;gv&#x00A0;-
</div>
<!--l. 1153--><p class="nopar" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">3.1.1    </span> <a 
 id="x1-420003.1.1"></a>Exercises</h4>
<a 
 id="dx1-42001"></a>
<!--l. 1159--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-42003x1">Add smoothing with <span 
class="pcrb8t-">-S</span>4.
   </li>
   <li 
  class="enumerate" id="x1-42005x2">Try tick all highs and lows with <span 
class="pcrb8t-">-T</span>.
   </li>
   <li 
  class="enumerate" id="x1-42007x3">Skip small features with <span 
class="pcrb8t-">-Q</span>10.
   </li>
   <li 
  class="enumerate" id="x1-42009x4">Override region using <span 
class="pcrb8t-">-R</span>-70/-60/25/35.
   </li>
   <li 
  class="enumerate" id="x1-42011x5">Try another region that clips our data domain.
   </li>
   <li 
  class="enumerate" id="x1-42013x6">Scale data to km and use the km unit in the annotations.
   </li></ol>
<a 
 id="dx1-42014"></a>
<!--l. 1176--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">3.2    </span> <a 
 id="x1-430003.2"></a>Gridding of arbitrarily spaced data</h3>
<!--l. 1178--><p class="noindent" >Except in the situation above when a grid file is available, we must convert our data to the right format readable
by <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;before we can make contour plots and color-coded images. We distinguish between two
scenarios:
</p><!--l. 1183--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-43002x1">The (<span 
class="ptmri8t-">x</span>, <span 
class="ptmri8t-">y</span>, <span 
class="ptmri8t-">z</span>) data are available on a regular lattice grid.
   </li>
   <li 
  class="enumerate" id="x1-43004x2">The (<span 
class="ptmri8t-">x</span>, <span 
class="ptmri8t-">y</span>, <span 
class="ptmri8t-">z</span>) data are distributed unevenly in the plane.
   </li></ol>
<!--l. 1193--><p class="indent" >   The former situation may require a simple reformatting (using <a 
href="../html/man/xyz2grd.html" ><span 
class="phvb8t-">xyz2grd</span></a><a 
 id="dx1-43005"></a>), while the latter must be interpolated
onto a regular lattice; this process is known as gridding. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;supports three different approaches to gridding;
here, we will briefly discuss the two most common techniques.
                                                                                 

                                                                                 
</p><!--l. 1200--><p class="indent" >   All <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;gridding programs have in common the requirement that the user must specify the grid domain and
output filename: <br 
class="newline" />
</p>
   <div class="tabular"> <table id="TBL-10" class="tabular" 
cellspacing="0" cellpadding="0"  
><colgroup id="TBL-10-1g"><col 
id="TBL-10-1" /><col 
id="TBL-10-2" /></colgroup><tr  
 style="vertical-align:baseline;" id="TBL-10-1-"><td  style="text-align:left; white-space:nowrap;" id="TBL-10-1-1"  
class="td11"><span 
class="pcrb8t-">-R</span><span 
class="ptmri8t-">xmin</span>/<span 
class="ptmri8t-">xmax</span>/<span 
class="ptmri8t-">ymin</span>/<span 
class="ptmri8t-">ymax                                                                                                                                                                                                                                                                                                                                                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-10-1-2"  
class="td11">The desired grid extent                                                                </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-10-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-10-2-1"  
class="td11"><span 
class="pcrb8t-">-I</span><span 
class="ptmri8t-">xinc</span>[<span 
class="ptmb8t-">m</span><!--l. 1205--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-">c</span>][/<span 
class="ptmri8t-">yinc</span>[<span 
class="ptmb8t-">m</span><!--l. 1205--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-">c</span>]]</td><td  style="text-align:left; white-space:nowrap;" id="TBL-10-2-2"  
class="td11">The grid spacing (append <span 
class="ptmb8t-">m </span>or <span 
class="ptmb8t-">c </span>for minutes or seconds of arc)</td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-10-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-10-3-1"  
class="td11"><span 
class="pcrb8t-">-G</span><span 
class="ptmri8t-">gridfile                                                                                                                                                                                                                                                                                                                                                                         </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-10-3-2"  
class="td11">The output grid filename                                                             </td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-10-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-10-4-1"  
class="td11">                                                                                                                                                             </td> </tr></table>
</div>
<!--l. 1209--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">3.2.1    </span> <a 
 id="x1-440003.2.1"></a>Nearest neighbor gridding</h4>
   <hr class="figure" /><div class="figure" 
>
                                                                                 

                                                                                 
<a 
 id="x1-44001r1"></a>
                                                                                 

                                                                                 

<!--l. 1211--><p class="noindent" ><img 
src="images/GMT_nearneighbor.png" alt="PIC"  
 />
<br /> </p><div class="caption" 
><span class="id">Figure&#x00A0;3.1: </span><span  
class="content">Search geometry for <a 
href="../html/man/nearneighbor.html" ><span 
class="phvb8t-">nearneighbor</span></a><a 
 id="dx1-44002"></a>.</span></div><!--tex4ht:label?: x1-44001r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfigure" />
<!--l. 1213--><p class="indent" >   The <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;program <a 
href="../html/man/nearneighbor.html" ><span 
class="phvb8t-">nearneighbor</span></a><a 
 id="dx1-44003"></a> implements a simple &#8220;nearest neighbor&#8221; averaging operation. It is the
preferred way to grid data when the data density is high. <a 
href="../html/man/nearneighbor.html" ><span 
class="phvb8t-">nearneighbor</span></a><a 
 id="dx1-44004"></a> is a local procedure which means it will
only consider the control data that is close to the desired output grid node. Only data points inside a specified
search radius will be used, and we may also impose the condition that each of the <span 
class="ptmri8t-">n </span>sectors must have at least one
data point in order to assign the nodal value. The nodal value is computed as a weighted average of the nearest data
point per sector inside the search radius, with each point weighted according to its distance from the node as
follows:
</p>
   <div class="par-math-display"><!--l. 1225--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="block" ><mrow 
>
                                                          <mover 
accent="true"><mrow 
><mi 
>z</mi></mrow><mo 
class="MathClass-op">&#x0304;</mo></mover> <mo 
class="MathClass-rel">=</mo> <mfrac><mrow 
><munderover accentunder="false" accent="false"><mrow  
><mo mathsize="big" 
>&#x2211;</mo></mrow><mrow 
><mi 
>i</mi><mo 
class="MathClass-rel">=</mo><mn>1</mn></mrow><mrow 
><mi 
>n</mi></mrow></munderover 
><msub><mrow 
><mi 
>z</mi></mrow><mrow 
><mi 
>i</mi></mrow></msub 
><msub><mrow 
><mi 
>w</mi></mrow><mrow 
><mi 
>i</mi></mrow></msub 
></mrow> 
 <mrow 
><munderover accentunder="false" accent="false"><mrow  
><mo mathsize="big" 
>&#x2211;</mo></mrow><mrow 
><mi 
>i</mi><mo 
class="MathClass-rel">=</mo><mn>1</mn></mrow><mrow 
><mi 
>n</mi></mrow></munderover 
><msub><mrow 
><mi 
>w</mi></mrow><mrow 
><mi 
>i</mi></mrow></msub 
></mrow></mfrac>  <mspace width="1em" class="quad"/><msub><mrow 
><mi 
>w</mi></mrow><mrow 
><mi 
>i</mi></mrow></msub 
> <mo 
class="MathClass-rel">=</mo><msup><mrow 
> <mfenced separators="" 
open="("  close=")" ><mrow><mn>1</mn><mo 
class="MathClass-bin">+</mo> <mfrac><mrow 
><mn>9</mn><msubsup><mrow 
><mi 
>r</mi></mrow><mrow 
><mi 
>i</mi></mrow><mrow 
><mn>2</mn></mrow></msubsup 
></mrow> 
 <mrow 
><msup><mrow 
><mi 
>R</mi></mrow><mrow 
><mn>2</mn></mrow></msup 
></mrow></mfrac>  </mrow></mfenced></mrow><mrow 
><mo 
class="MathClass-bin">-</mo><mn>1</mn></mrow></msup 
>
</mrow></math></div>
<!--l. 1228--><p class="nopar" >
<a 
 id="dx1-44005"></a>
</p><!--l. 1232--><p class="noindent" >The most important switches are listed in Table&#x00A0;<a 
href="#x1-44006r2">3.2<!--tex4ht:ref: tbl:nearneighbor --></a>.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1235--><p class="indent" >   <a 
 id="x1-44006r2"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-11" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-11-1g"><col 
id="TBL-11-1" /></colgroup><colgroup id="TBL-11-2g"><col 
id="TBL-11-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-11-1-1"  
class="td11">  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>  </td><td  style="text-align:center; white-space:nowrap;" id="TBL-11-1-2"  
class="td11">                        <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-11-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-S</span><span 
class="ptmri8t-x-x-90">radius</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">k</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-11-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets search radius. Append </span><span 
class="ptmb8t-x-x-90">k </span><span 
class="ptmr8t-x-x-90">to indicate radius in kilometers [Default is </span><span 
class="ptmri8t-x-x-90">x</span><span 
class="ptmr8t-x-x-90">-units]</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-11-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-E</span><span 
class="ptmri8t-x-x-90">empty     </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-11-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Assign this value to unconstrained nodes [Default is NaN]                                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-11-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N</span><span 
class="ptmri8t-x-x-90">sectors    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-11-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sector search, indicate number of sectors [Default is 4]                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-11-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W      </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-11-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Read relative weights from the 4th column of input data                                       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-11-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-11-6-1"  
class="td11">        </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;3.2: </span><span  
class="content">Switches used with the <a 
href="../html/man/nearneighbor.html" ><span 
class="phvb8t-">nearneighbor</span></a><a 
 id="dx1-44007"></a> program.</span></div><!--tex4ht:label?: x1-44006r2 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1249--><p class="indent" >   We will grid the data in the file <span class="underline">ship.xyz</span> which contains ship observations of bathymetry off Baja California.
You can find the file in the sub-directory for example 15. We desire to make a 5&#8217; by 5&#8217; grid. Running <a 
href="../html/man/minmax.html" ><span 
class="phvb8t-">minmax</span></a><a 
 id="dx1-44008"></a> on
the file yields
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-24">
ship.xyz:&#x00A0;N&#x00A0;=&#x00A0;82970&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x00A0;&#x003C;245/254.705&#x003E;&#x00A0;&#x00A0;&#x00A0;&#x003C;20/29.99131&#x003E;&#x00A0;&#x00A0;&#x00A0;&#x003C;-7708/-9&#x003E;
</div>
<!--l. 1256--><p class="nopar" >
</p><!--l. 1259--><p class="indent" >   so we choose the region accordingly:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-25">
nearneighbor&#x00A0;-R245/255/20/30&#x00A0;-I5m&#x00A0;-S40k&#x00A0;-Gship.nc&#x00A0;-V&#x00A0;ship.xyz
</div>
<!--l. 1263--><p class="nopar" >
</p><!--l. 1266--><p class="indent" >   We may get a view of the contour map using
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-26">
grdcontour&#x00A0;ship.nc&#x00A0;-JM6i&#x00A0;-P&#x00A0;-B2&#x00A0;-C250&#x00A0;-A1000&#x00A0;|&#x00A0;gv&#x00A0;-
</div>
<!--l. 1270--><p class="nopar" >
</p><!--l. 1273--><p class="indent" >   Since the grid <span class="underline">ship.nc</span> is stored in netCDF format that is supported by a host of other programs, you can try one
of those as well on the same grid.
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-450003.2.1"></a>Exercises</h5>
<a 
 id="dx1-45001"></a>
<!--l. 1279--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-45003x1">Try using a 100 km search radius and a 10 minute grid spacing.
   </li></ol>
<a 
 id="dx1-45004"></a>
<!--l. 1286--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">3.2.2    </span> <a 
 id="x1-460003.2.2"></a>Gridding with Splines in Tension</h4>
<!--l. 1288--><p class="noindent" >As an alternative, we may use a global procedure to grid our data. This approach, implemented in the program
<a 
href="../html/man/surface.html" ><span 
class="phvb8t-">surface</span></a><a 
 id="dx1-46001"></a>, represents an improvement over standard minimum curvature algorithms by allowing users to introduce
some tension into the surface. Physically, we are trying to force a thin elastic plate to go through all our data points;
the values of this surface at the grid points become the gridded data. Mathematically, we want to find the function
<!--l. 1295--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi><mrow ><mo 
class="MathClass-open">(</mo><mrow><mi 
>x</mi><mo 
class="MathClass-punc">,</mo><mi 
>y</mi></mrow><mo 
class="MathClass-close">)</mo></mrow></math> that
satisfies the following constraints: <br 
class="newline" /><a 
 id="dx1-46002"></a>
</p><!--l. 1298--><p class="indent" >   <!--l. 1298--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mrow 
> <mtable  style="text-align:axis;"  
equalrows="false" columnlines="none" equalcolumns="false" class="array"><mtr><mtd 
class="array"  columnalign="left"><mi 
>z</mi><mrow ><mo 
class="MathClass-open">(</mo><mrow><msub><mrow 
><mi 
>x</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
><mo 
class="MathClass-punc">,</mo><msub><mrow 
><mi 
>y</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
></mrow><mo 
class="MathClass-close">)</mo></mrow> <mo 
class="MathClass-rel">=</mo> <msub><mrow 
><mi 
>z</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
><mo 
class="MathClass-punc">,</mo>        </mtd><mtd 
class="array"  columnalign="left"><mstyle 
class="mbox"><mtext  >for&#x00A0;all&#x00A0;data&#x00A0;</mtext><mstyle 
class="math"><mrow ><mo 
class="MathClass-open">(</mo><mrow><msub><mrow 
><mi 
>x</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
><mo 
class="MathClass-punc">,</mo><msub><mrow 
><mi 
>y</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
><mo 
class="MathClass-punc">,</mo><msub><mrow 
><mi 
>z</mi></mrow><mrow 
><mi 
>k</mi></mrow></msub 
></mrow><mo 
class="MathClass-close">)</mo></mrow><mo 
class="MathClass-punc">,</mo><mi 
>k</mi> <mo 
class="MathClass-rel">=</mo> <mn>1</mn><mo 
class="MathClass-punc">,</mo><mi 
>n</mi></mstyle><mtext  ></mtext></mstyle></mtd>
</mtr><mtr><mtd 
class="array"  columnalign="left"><mrow ><mo 
class="MathClass-open">(</mo><mrow><mn>1</mn><mo 
class="MathClass-bin">-</mo><mi 
>t</mi></mrow><mo 
class="MathClass-close">)</mo></mrow><msup><mrow 
><mo 
class="MathClass-op">&#x2207;</mo></mrow><mrow 
><mn>4</mn></mrow></msup 
><mi 
>z</mi><mo 
class="MathClass-bin">-</mo><mi 
>t</mi><msup><mrow 
><mo 
class="MathClass-op">&#x2207;</mo></mrow><mrow 
><mn>2</mn></mrow></msup 
><mi 
>z</mi> <mo 
class="MathClass-rel">=</mo> <mn>0</mn></mtd><mtd 
class="array"  columnalign="left"><mstyle 
class="mbox"><mtext  >elsewhere</mtext></mstyle>                                </mtd></mtr> <!--ll--></mtable>                                                                                      </mrow></math>
<br 
class="newline" />
</p><!--l. 1303--><p class="noindent" >where <!--l. 1304--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>t</mi></math> is the &#8220;tension&#8221;,
<!--l. 1304--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mn>0</mn> <mo 
class="MathClass-rel">&#x2264;</mo> <mi 
>t</mi> <mo 
class="MathClass-rel">&#x2264;</mo> <mn>1</mn></math>. Basically, as
<!--l. 1305--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>t</mi> <mo 
class="MathClass-rel">&#x2192;</mo> <mn>0</mn></math> we obtain the minimum
curvature solution, while as <!--l. 1306--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>t</mi> <mo 
class="MathClass-rel">&#x2192;</mo><mi 
>&#x221E;</mi></math>
we go towards a harmonic solution (which is linear in cross-section). The theory behind all
this is quite involved and we do not have the time to explain it all here, please see <span 
class="ptmri8t-">Smith and</span>
<span 
class="ptmri8t-">Wessel </span>[1990] for details. Some of the most important switches for this program are indicated in
Table&#x00A0;<a 
href="#x1-46004r3">3.3<!--tex4ht:ref: tbl:surface --></a><span class="footnote-mark"><a 
href="#fn2x3" id="fn2x3-bk"><sup class="textsuperscript">2</sup></a></span><a 
 id="x1-46003f2"></a>.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1313--><p class="indent" >   <a 
 id="x1-46004r3"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-13" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-13-1g"><col 
id="TBL-13-1" /></colgroup><colgroup id="TBL-13-2g"><col 
id="TBL-13-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-13-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-13-1-1"  
class="td11"> <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div> </td><td  style="text-align:center; white-space:nowrap;" id="TBL-13-1-2"  
class="td11">                <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-13-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-13-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-A</span><span 
class="ptmri8t-x-x-90">aspect </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-13-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets aspect ratio for anisotropic grids.                            </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-13-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-13-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">limit    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-13-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets convergence limit. Default is 1/1000 of data range.</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-13-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-13-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-T</span><span 
class="ptmri8t-x-x-90">tension</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-13-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets the tension [Default is 0]                                         </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-13-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-13-5-1"  
class="td11">       </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;3.3: </span><span  
class="content">Some of the options in <a 
href="../html/man/surface.html" ><span 
class="phvb8t-">surface</span></a><a 
 id="dx1-46005"></a>.</span></div><!--tex4ht:label?: x1-46004r3 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
   <h4 class="subsectionHead"><span class="titlemark">3.2.3    </span> <a 
 id="x1-470003.2.3"></a>Preprocessing</h4>
<!--l. 1328--><p class="noindent" >The <a 
href="../html/man/surface.html" ><span 
class="phvb8t-">surface</span></a><a 
 id="dx1-47001"></a> program assumes that the data have been preprocessed to eliminate aliasing, hence we must ensure
that this step is completed prior to gridding. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;comes with three preprocessors, called <a 
href="../html/man/blockmean.html" ><span 
class="phvb8t-">blockmean</span></a><a 
 id="dx1-47002"></a>,
<a 
href="../html/man/blockmedian.html" ><span 
class="phvb8t-">blockmedian</span></a><a 
 id="dx1-47003"></a>, and <a 
href="../html/man/blockmode.html" ><span 
class="phvb8t-">blockmode</span></a><a 
 id="dx1-47004"></a>. The first averages values inside the grid-spacing boxes, the second returns
median values, wile the latter returns modal values. As a rule of thumb, we use means for most smooth data (such
as potential fields) and medians (or modes) for rough, non-Gaussian data (such as topography). In
addition to the required <span 
class="pcrb8t-">-R </span>and <span 
class="pcrb8t-">-I </span>switches, these preprocessors all take the same options (listed in
Table&#x00A0;<a 
href="#x1-47005r4">3.4<!--tex4ht:ref: tbl:preprocess --></a>).
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1340--><p class="indent" >   <a 
 id="x1-47005r4"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-14" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-14-1g"><col 
id="TBL-14-1" /></colgroup><colgroup id="TBL-14-2g"><col 
id="TBL-14-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-14-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-14-1-1"  
class="td11">                                       <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>                                        </td><td  style="text-align:center; white-space:nowrap;" id="TBL-14-1-2"  
class="td11">                <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-14-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-14-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N                                                                                 </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-14-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Choose pixel node registration [Default is gridline]         </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-14-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-14-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">i</span><!--l. 1346--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">o</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-14-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Append </span><span 
class="ptmb8t-x-x-90">i </span><span 
class="ptmr8t-x-x-90">or </span><span 
class="ptmb8t-x-x-90">o </span><span 
class="ptmr8t-x-x-90">to read or write weights in the 4th column</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-14-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-14-4-1"  
class="td11">                                                                                   </td></tr></table>
</div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;3.4: </span><span  
class="content">Some of the preprocessing options.</span></div><!--tex4ht:label?: x1-47005r4 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1352--><p class="indent" >   With respect to our ship data we preprocess it using the median method:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-27">
blockmedian&#x00A0;-R245/255/20/30&#x00A0;-I5m&#x00A0;-V&#x00A0;ship.xyz&#x00A0;&#x003E;&#x00A0;ship_5m.xyz
</div>
<!--l. 1356--><p class="nopar" >
</p><!--l. 1359--><p class="indent" >   The output data can now be used with surface:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-28">
surface&#x00A0;ship_5m.xyz&#x00A0;-R245/255/20/30&#x00A0;-I5m&#x00A0;-Gship.nc&#x00A0;-V
</div>
<!--l. 1363--><p class="nopar" >
</p><!--l. 1366--><p class="indent" >   If you rerun <a 
href="../html/man/grdcontour.html" ><span 
class="phvb8t-">grdcontour</span></a><a 
 id="dx1-47006"></a> on the new grid file (try it!) you will notice a big difference compared to
the grid made by <a 
href="../html/man/nearneighbor.html" ><span 
class="phvb8t-">nearneighbor</span></a><a 
 id="dx1-47007"></a>: since <a 
href="../html/man/surface.html" ><span 
class="phvb8t-">surface</span></a><a 
 id="dx1-47008"></a> is a global method it will evaluate the solution at
all nodes, even if there are no data constraints. There are numerous options available to us at this
point:
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-47010x1">We can reset all nodes too far from a data constraint to the NaN value.
   </li>
   <li 
  class="enumerate" id="x1-47012x2">We can pour white paint over those regions where contours are unreliable.
   </li>
   <li 
  class="enumerate" id="x1-47014x3">We can plot the landmass which will cover most (but not all) of the unconstrained areas.
   </li>
   <li 
  class="enumerate" id="x1-47016x4">We can set up a clip path so that only the contours in the constrained region will show.
   </li></ol>
<!--l. 1389--><p class="indent" >   Here we have only time to explore the latter approach. The <a 
href="../html/man/psmask.html" ><span 
class="phvb8t-">psmask</span></a><a 
 id="dx1-47017"></a> program can read the same preprocessed
data and set up a contour mask based on the data distribution. Once the clip path is activated we can
contour the final grid; we finally deactivate the clipping with a second call to <a 
href="../html/man/psmask.html" ><span 
class="phvb8t-">psmask</span></a><a 
 id="dx1-47018"></a>. Here&#8217;s the
recipe:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-29">
psmask&#x00A0;-R245/255/20/30&#x00A0;-I5m&#x00A0;ship_5m.xyz&#x00A0;-JM6i&#x00A0;-B2&#x00A0;-P&#x00A0;-K&#x00A0;-V&#x00A0;&#x003E;&#x00A0;map.ps
&#x00A0;<br />grdcontour&#x00A0;ship.nc&#x00A0;-J&#x00A0;-O&#x00A0;-K&#x00A0;-C250&#x00A0;-A1000&#x00A0;&#x003E;&#x003E;&#x00A0;map.ps
&#x00A0;<br />psmask&#x00A0;-C&#x00A0;-O&#x00A0;&#x003E;&#x003E;&#x00A0;map.ps
</div>
<!--l. 1399--><p class="nopar" >
</p>
   <h3 class="sectionHead"><span class="titlemark">3.3    </span> <a 
 id="x1-480003.3"></a>Exercises</h3>
<a 
 id="dx1-48001"></a>
<!--l. 1405--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-48003x1">Add the continents using any color you want.
   </li>
   <li 
  class="enumerate" id="x1-48005x2">Color the clip path light gray (use <span 
class="pcrb8t-">-G </span>in the first <a 
href="../html/man/psmask.html" ><span 
class="phvb8t-">psmask</span></a><a 
 id="dx1-48006"></a> call).
   </li></ol>
<a 
 id="dx1-48007"></a>
                                                                                 

                                                                                 
   <h2 class="chapterHead"><span class="titlemark">Chapter&#x00A0;4</span><br /><a 
 id="x1-490004"></a>SESSION FOUR</h2>
<!--l. 1418--><p class="noindent" >In our final session we will concentrate on color images and perspective views of gridded data sets. Before we start
that discussion we need to cover three important aspects of plotting that must be understood. These
are
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-49002x1">Color tables and pseudo-colors in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>.
   </li>
   <li 
  class="enumerate" id="x1-49004x2">Artificial illumination and how it affects colors.
   </li>
   <li 
  class="enumerate" id="x1-49006x3">Multi-dimensional grids.</li></ol>
   <h3 class="sectionHead"><span class="titlemark">4.1    </span> <a 
 id="x1-500004.1"></a>Cpt files</h3>
<a 
 id="dx1-50001"></a>
<!--l. 1432--><p class="noindent" >The cpt file is discussed in detail in the <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;Technical Reference and Cookbook, Chapter 4. Please review the
format before experimenting further.
</p><!--l. 1437--><p class="indent" >   Cpt files can be created in any number of ways. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;provides two mechanisms:&#x00A0;
</p><!--l. 1440--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-50003x1">Create  simple,  linear  color  tables  given  a  master  color  table  (several  are  built-in)  and  the  desired
   <!--l. 1443--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math>-values
   at color boundaries (<a 
href="../html/man/makecpt.html" ><span 
class="phvb8t-">makecpt</span></a><a 
 id="dx1-50004"></a>)
   </li>
   <li 
  class="enumerate" id="x1-50006x2">Create  color  tables  based  on  a  master  cpt  color  table  and  the  histogram-equalized  distribution  of
   <!--l. 1447--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math>-values
   in a gridded data file (<a 
href="../html/man/grd2cpt.html" ><span 
class="phvb8t-">grd2cpt</span></a><a 
 id="dx1-50007"></a>)
   </li></ol>
<!--l. 1451--><p class="noindent" >One can also make these files manually or with <span 
class="ptmbo8t-">awk</span><a 
 id="dx1-50008"></a> or other tools. Here we will limit our discussion to <a 
href="../html/man/makecpt.html" ><span 
class="phvb8t-">makecpt</span></a><a 
 id="dx1-50009"></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
<!--l. 1456--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>z</mi></math>-values
to go with it. The main options are given below.
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1458--><p class="indent" >   <a 
 id="x1-50010r1"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-15" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-15-1g"><col 
id="TBL-15-1" /></colgroup><colgroup id="TBL-15-2g"><col 
id="TBL-15-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-15-1-1"  
class="td11"><div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div></td><td  style="text-align:center; white-space:nowrap;" id="TBL-15-1-2"  
class="td11">            <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-15-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-15-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Set the name of the master cpt file to use      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-15-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-I   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-15-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Reverse the sense of the color progression   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-15-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-V   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-15-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Run in verbose mode                                     </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-15-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Z   </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-15-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Make a continuous rather than discrete table</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-15-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-15-6-1"  
class="td11">     </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;4.1: </span><span  
class="content">Prime options available in <a 
href="../html/man/makecpt.html" ><span 
class="phvb8t-">makecpt</span></a><a 
 id="dx1-50011"></a>.</span></div><!--tex4ht:label?: x1-50010r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1472--><p class="indent" >   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>
   <div class="verbatim" id="verbatim-30">
makecpt&#x00A0;-Crainbow&#x00A0;-T-20/60/10&#x00A0;&#x003E;&#x00A0;disc.cpt
&#x00A0;<br />makecpt&#x00A0;-Crainbow&#x00A0;-T-20/60/10&#x00A0;-Z&#x00A0;&#x003E;&#x00A0;cont.cpt
</div>
<!--l. 1478--><p class="nopar" >
</p><!--l. 1481--><p class="noindent" >We can plot these color tables with <a 
href="../html/man/psscale.html" ><span 
class="phvb8t-">psscale</span></a><a 
 id="dx1-50012"></a>; the options worth mentioning here are listed in Table&#x00A0;<a 
href="#x1-50013r2">4.2<!--tex4ht:ref: tbl:psscale --></a>. In
addition, the <span 
class="pcrb8t-">-B </span>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>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1488--><p class="indent" >   <a 
 id="x1-50013r2"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-16" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-16-1g"><col 
id="TBL-16-1" /></colgroup><colgroup id="TBL-16-2g"><col 
id="TBL-16-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-16-1-1"  
class="td11">       <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>       </td><td  style="text-align:center; white-space:nowrap;" id="TBL-16-1-2"  
class="td11">                  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-16-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">cptfile                                </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-16-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">The required cpt file                                                                    </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-16-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-D</span><span 
class="ptmri8t-x-x-90">xpos</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">ypos</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">length</span><span 
class="ptmr8t-x-x-90">/</span><span 
class="ptmri8t-x-x-90">width</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">h</span><span 
class="ptmr8t-x-x-90">]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-16-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets the position of the center/left and dimensions of scale bar.</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-16-4-1"  
class="td11">                   </td><td  style="text-align:left; white-space:nowrap;" id="TBL-16-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Append </span><span 
class="ptmb8t-x-x-90">h </span><span 
class="ptmr8t-x-x-90">to get horizontal bar and give center/top instead       </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-16-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-I</span><span 
class="ptmri8t-x-x-90">max_intensity                    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-16-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Add illumination effects                                                             </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-16-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-16-6-1"  
class="td11">                   </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;4.2: </span><span  
class="content">The main switches and options in <a 
href="../html/man/psscale.html" ><span 
class="phvb8t-">psscale</span></a><a 
 id="dx1-50014"></a>.</span></div><!--tex4ht:label?: x1-50013r2 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
                                                                                 

                                                                                 
   <div class="verbatim" id="verbatim-31">
psbasemap&#x00A0;-R0/8.5/0/11&#x00A0;-Jx1i&#x00A0;-P&#x00A0;-B0&#x00A0;-K&#x00A0;&#x003E;&#x00A0;bar.ps
&#x00A0;<br />psscale&#x00A0;-D3i/3i/4i/0.5ih&#x00A0;-Cdisc.cpt&#x00A0;-B:discrete:&#x00A0;-O&#x00A0;-K&#x00A0;&#x003E;&#x003E;&#x00A0;bar.ps
&#x00A0;<br />psscale&#x00A0;-D3i/5i/4i/0.5ih&#x00A0;-Ccont.cpt&#x00A0;-B:continuous:&#x00A0;-O&#x00A0;-K&#x00A0;&#x003E;&#x003E;&#x00A0;bar.ps
&#x00A0;<br />psscale&#x00A0;-D3i/7i/4i/0.5ih&#x00A0;-Cdisc.cpt&#x00A0;-B:discrete:&#x00A0;-I0.5&#x00A0;-O&#x00A0;-K&#x00A0;&#x003E;&#x003E;&#x00A0;bar.ps
&#x00A0;<br />psscale&#x00A0;-D3i/9i/4i/0.5ih&#x00A0;-Ccont.cpt&#x00A0;-B:continuous:&#x00A0;-I0.5&#x00A0;-O&#x00A0;&#x003E;&#x003E;&#x00A0;bar.ps
</div>
<!--l. 1508--><p class="nopar" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">4.1.1    </span> <a 
 id="x1-510004.1.1"></a>Exercises</h4>
<a 
 id="dx1-51001"></a>
<!--l. 1514--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-51003x1">Redo the <a 
href="../html/man/makecpt.html" ><span 
class="phvb8t-">makecpt</span></a><a 
 id="dx1-51004"></a> exercise using the master table <span 
class="ptmri8t-">hot </span>and redo the bar plot.
   </li>
   <li 
  class="enumerate" id="x1-51006x2">Try specifying <span 
class="pcrb8t-">-B</span>10g5.
   </li></ol>
<a 
 id="dx1-51007"></a>
<!--l. 1524--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">4.2    </span> <a 
 id="x1-520004.2"></a>Illumination and intensities</h3>
<!--l. 1526--><p class="noindent" ><a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;allows for artificial illumination and shading. What this means is that we imagine an artificial sun placed at
infinity in some azimuth and elevation position illuminating our surface. The parts of the surface that slope toward
the sun should brighten while those sides facing away should become darker; no shadows are cast as a result of
topographic undulations.
</p><!--l. 1533--><p class="indent" >   While it is clear that the actual slopes of the surface and the orientation of the sun enter into these calculations,
there is clearly an arbitrary element when the surface is not topographic relief but some other quantity. For
instance, what does the slope toward the sun mean if we are plotting a grid of heat flow anomalies? While there are
many ways to accomplish what we want, <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;offers a relatively simple way: We may calculate the gradient of
the surface in the direction of the sun and normalize these values to fall in the <span 
class="ptmr8c-">±</span>1 range; +1 means maximum sun
exposure and -1 means complete shade. Although we will not show it here, it should be added that <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;treats the
intensities as a separate data set. Thus, while these values are often derived from the relief surface
we want to image they could be separately observed quantities such as back-scatter information. <a 
 id="dx1-52001"></a><a 
 id="dx1-52002"></a>
<a 
 id="dx1-52003"></a>
</p><!--l. 1551--><p class="indent" >   Colors in <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;are specified in the RGB system used for computer screens; it mixes red, green, and blue light
to achieve other colors. The RGB system is a Cartesian coordinate system and produces a color cube. For
reasons better explained in Appendix I in the Reference book it is difficult to darken and brighten
a color based on its RGB values and an alternative coordinate system is used instead; here we use
the HSV system. If you hold the color cube so that the black and white corners are along a vertical
axis, then the other 6 corners project onto the horizontal plane to form a hexagon; the corners of this
hexagon are the primary colors Red, Yellow, Green, Cyan, Blue, and Magenta. The CMY colors are
the complimentary colors and are used when paints are mixed to produce a new color (this is how
printers operate; they also add pure black (K) to avoid making gray from CMY). In this coordinate
system the angle 0&#8211;360<span 
class="ptmr8c-">°</span>&#x00A0;is the hue (H); the Saturation and Value are harder to explain. Suffice it to
say here that we intend to darken any pure color (on the cube facets) by keeping H fixed and adding
                                                                                 

                                                                                 
black and brighten it by adding white; for interior points in the cube we will add or remove gray.
This operation is efficiently done in the HSV coordinate system; hence all <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;shading operations
involve translating from RGB to HSV, do the illumination effect, and transform back the modified RGB
values.
</p><!--l. 1572--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">4.3    </span> <a 
 id="x1-530004.3"></a>Color images</h3>
<a 
 id="dx1-53001"></a>
<!--l. 1575--><p class="noindent" >Once a cpt file has been made it is relatively straightforward to generate a color image of a gridded data. Here, we
will extract a subset of the global 30" DEM (data id 9) from USGS:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-32">
grdraster&#x00A0;9&#x00A0;-R-108/-103/35/40&#x00A0;-Gus.nc
</div>
<!--l. 1581--><p class="nopar" >
</p><!--l. 1584--><p class="indent" >   You can find the grid <span class="underline">us.nc</span> also in the <span class="underline">tutorial</span> directory of your <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a> installation. Using <a 
href="../html/man/grdinfo.html" ><span 
class="phvb8t-">grdinfo</span></a><a 
 id="dx1-53002"></a> we find that the data
ranges from <!--l. 1586--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" > <mo 
class="MathClass-rel">~</mo></math>1000m
to <!--l. 1588--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" > <mo 
class="MathClass-rel">~</mo></math>4300m so
we make a cpt file accordingly:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-33">
makecpt&#x00A0;-Crainbow&#x00A0;-T1000/5000/500&#x00A0;-Z&#x00A0;&#x003E;&#x00A0;topo.cpt
</div>
<!--l. 1592--><p class="nopar" >
</p><!--l. 1595--><p class="indent" >   Color images are made with <a 
href="../html/man/grdimage.html" ><span 
class="phvb8t-">grdimage</span></a><a 
 id="dx1-53003"></a> which takes the usual common command options (by default the <span 
class="pcrb8t-">-R </span>is
taken from the data set) and a cptfile; the main other options are
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1599--><p class="indent" >   <a 
 id="x1-53004r3"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-17" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-17-1g"><col 
id="TBL-17-1" /></colgroup><colgroup id="TBL-17-2g"><col 
id="TBL-17-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-17-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-17-1-1"  
class="td11"> <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div> </td><td  style="text-align:center; white-space:nowrap;" id="TBL-17-1-2"  
class="td11">                    <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-17-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-17-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-E</span><span 
class="ptmri8t-x-x-90">dpi        </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-17-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Sets the desired resolution of the image [Default is data resolution]</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-17-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-17-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-I</span><span 
class="ptmri8t-x-x-90">intenfile</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-17-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Use artificial illumination using intensities from </span><span 
class="ptmri8t-x-x-90">intensfile               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-17-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-17-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-M     </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-17-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Force gray shade using the (television) YIQ conversion                   </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-17-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-17-5-1"  
class="td11">       </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;4.3: </span><span  
class="content">The main options in <a 
href="../html/man/grdimage.html" ><span 
class="phvb8t-">grdimage</span></a><a 
 id="dx1-53005"></a>.</span></div><!--tex4ht:label?: x1-53004r3 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1612--><p class="indent" >   We want to make a plain color map with a color bar superimposed above the plot. We try
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-34">
grdimage&#x00A0;us.nc&#x00A0;-JM6i&#x00A0;-P&#x00A0;-B2&#x00A0;-Ctopo.cpt&#x00A0;-V&#x00A0;-K&#x00A0;&#x003E;&#x00A0;topo.ps
&#x00A0;<br />psscale&#x00A0;-D3i/8.5i/5i/0.25ih&#x00A0;-Ctopo.cpt&#x00A0;-I0.4&#x00A0;-B/:m:&#x00A0;-O&#x00A0;&#x003E;&#x003E;&#x00A0;topo.ps
</div>
<!--l. 1618--><p class="nopar" >
</p><!--l. 1621--><p class="indent" >   The plain color map lacks detail and fails to reveal the topographic complexity of this Rocky Mountain
region. What it needs is artificial illumination. We want to simulate shading by a sun source in the east,
hence we derive the required intensities from the gradients of the topography in the N90<span 
class="ptmr8c-">°</span>E direction
using <a 
href="../html/man/grdgradient.html" ><span 
class="phvb8t-">grdgradient</span></a><a 
 id="dx1-53006"></a>. Other than the required input and output filenames, the available options are
<a 
 id="dx1-53007"></a><a 
 id="dx1-53008"></a>
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1630--><p class="indent" >   <a 
 id="x1-53009r4"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-18" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-18-1g"><col 
id="TBL-18-1" /></colgroup><colgroup id="TBL-18-2g"><col 
id="TBL-18-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-18-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-18-1-1"  
class="td11">                                            <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>                                             </td><td  style="text-align:center; white-space:nowrap;" id="TBL-18-1-2"  
class="td11">                                                   <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-18-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-A</span><span 
class="ptmri8t-x-x-90">azimuth                                                                                                                                                                                                             </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-18-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Azimuthal direction for gradients                                                                                                                                                                                                             </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-18-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-M                                                                                           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-18-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Indicates that this is a geographic grid                                                                                                                                                                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-18-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-N</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">t</span><!--l. 1637--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mo 
class="MathClass-rel">|</mo></math><span 
class="ptmb8t-x-x-90">e</span><span 
class="ptmr8t-x-x-90">][</span><span 
class="ptmri8t-x-x-90">norm</span><span 
class="ptmr8t-x-x-90">[/</span><span 
class="ptmri8t-x-x-90">offset</span><span 
class="ptmr8t-x-x-90">]]</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-18-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Normalize gradients by </span><span 
class="ptmri8t-x-x-90">norm/offset </span><span 
class="ptmr8t-x-x-90">[= 1/0 by default].                                                                                                                                                                            </span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-18-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-5-1"  
class="td11">                                                                                             </td><td  style="text-align:left; white-space:nowrap;" id="TBL-18-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Insert </span><span 
class="ptmb8t-x-x-90">t </span><span 
class="ptmr8t-x-x-90">to normalize by the </span><!--l. 1638--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mi 
>t</mi><mi 
>a</mi><msup><mrow 
><mi 
>n</mi></mrow><mrow 
><mo 
class="MathClass-bin">-</mo><mn>1</mn></mrow></msup 
></math> <span 
class="ptmr8t-x-x-90">transformation.</span></td>
</tr><tr  
 style="vertical-align:baseline;" id="TBL-18-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-6-1"  
class="td11">                                                                                             </td><td  style="text-align:left; white-space:nowrap;" id="TBL-18-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Insert </span><span 
class="ptmb8t-x-x-90">e </span><span 
class="ptmr8t-x-x-90">to normalize by the cumulative Laplace distribution.                                                                                                                                                                  </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-18-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-18-7-1"  
class="td11">                                                                                             </td></tr></table>
</div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;4.4: </span><span  
class="content">The <a 
href="../html/man/grdgradient.html" ><span 
class="phvb8t-">grdgradient</span></a><a 
 id="dx1-53010"></a> options.</span></div><!--tex4ht:label?: x1-53009r4 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
<!--l. 1645--><p class="indent" >   Figure&#x00A0;<a 
href="#x1-53011r1">4.1<!--tex4ht:ref: fig:GMT_atan --></a> shows that raw slopes from bathymetry tend to be far from normally distributed (left).
By using the inverse tangent transformation we can ensure a more uniform distribution (right). The
inverse tangent transform simply takes the raw slope estimate (the <span 
class="ptmri8t-">x </span>value at the arrow) and returns the
corresponding inverse tangent value (normalized to fall in the <span 
class="ptmr8c-">±</span>1 range; horizontal arrow pointing to the
<span 
class="ptmri8t-">y</span>-value).
</p>
   <hr class="figure" /><div class="figure" 
>
                                                                                 

                                                                                 
<a 
 id="x1-53011r1"></a>
                                                                                 

                                                                                 

<!--l. 1653--><p class="noindent" ><img 
src="images/GMT_atan.png" alt="PIC"  
 />
<br /> </p><div class="caption" 
><span class="id">Figure&#x00A0;4.1: </span><span  
class="content">How the inverse tangent operation works.</span></div><!--tex4ht:label?: x1-53011r1 -->
                                                                                 

                                                                                 
   </div><hr class="endfigure" />
<!--l. 1655--><p class="indent" >   Both <span 
class="pcrb8t-">-Ne </span>and <span 
class="pcrb8t-">-Nt </span>yield well behaved gradients. Personally, we prefer to use the <span 
class="pcrb8t-">-Ne </span>option; the
value of <span 
class="ptmri8t-">norm </span>is subjective and you may experiment somewhat in the 0.5&#8211;5 range. For our case we
choose
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-35">
grdgradient&#x00A0;us.nc&#x00A0;-Ne0.8&#x00A0;-A100&#x00A0;-M&#x00A0;-Gus_i.nc
</div>
<!--l. 1662--><p class="nopar" >
</p><!--l. 1665--><p class="indent" >   Given the cpt file and the two gridded data sets we can create the shaded relief image:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-36">
grdimage&#x00A0;us.nc&#x00A0;-Ius_i.nc&#x00A0;-JM6i&#x00A0;-P&#x00A0;-B2&#x00A0;-Ctopo.cpt&#x00A0;-K&#x00A0;&#x003E;&#x00A0;topo.ps
&#x00A0;<br />psscale&#x00A0;-D3i/8.5i/5i/0.25ih&#x00A0;-Ctopo.cpt&#x00A0;-I0.4&#x00A0;-B/:m:&#x00A0;-O&#x00A0;&#x003E;&#x003E;&#x00A0;topo.ps
</div>
<!--l. 1671--><p class="nopar" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">4.3.1    </span> <a 
 id="x1-540004.3.1"></a>Exercises</h4>
<a 
 id="dx1-54001"></a>
<!--l. 1677--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-54003x1">Force a gray-shade image.
   </li>
   <li 
  class="enumerate" id="x1-54005x2">Rerun <a 
href="../html/man/grdgradient.html" ><span 
class="phvb8t-">grdgradient</span></a><a 
 id="dx1-54006"></a> with <span 
class="pcrb8t-">-N</span>1.
   </li></ol>
<a 
 id="dx1-54007"></a>
<!--l. 1686--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">4.4    </span> <a 
 id="x1-550004.4"></a>Multi-dimensional maps</h3>
<a 
 id="dx1-55001"></a>
<!--l. 1689--><p class="noindent" >Climate data, like ocean temperatures or atmospheric pressure, are often provided as multi-dimensional (3-D, 4-D
or 5-D) grids in netCDF format. This section will demonstrate that <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a> is able to plot &#8220;horizonal&#8221; slices
(spanning latitude and longitude) of such grids without much effort.
</p><!--l. 1694--><p class="indent" >   As an example we will download the Seasonal Analysed Mean Temperature from the <a 
href="http://www.cdc.noaa.gov/cdc/data.nodc.woa98.html" >World Ocean Atlas 1998</a>.
The file in question is named <a 
href="ftp://ftp.cdc.noaa.gov/Datasets/nodc.woa98/temperat/seasonal/otemp.anal1deg.nc" ><span class="underline">otemp.anal1deg.nc</span></a>.
</p><!--l. 1699--><p class="indent" >   You can look at the information pertained in this file using the program <span 
class="ptmbo8t-">ncdump</span><a 
 id="dx1-55002"></a> and notice that the variable
that we want to plot (otemp) is a four-dimensional variable of time, level (i.e., depth), latitude and
longitude.
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-37">
ncdump&#x00A0;-h&#x00A0;otemp.anal1deg.nc
</div>
<!--l. 1705--><p class="nopar" >
</p><!--l. 1708--><p class="indent" >   We will need to make an appropriate color scale, running from -2<span 
class="ptmr8c-">°</span>C (freezing temperature of salt water) to
30<span 
class="ptmr8c-">°</span>C (highest likely ocean temperature). We do this as follows:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-38">
makecpt&#x00A0;-Cno_green&#x00A0;-T-2/30/2&#x00A0;&#x003E;&#x00A0;otemp.cpt
</div>
<!--l. 1713--><p class="nopar" >
</p><!--l. 1716--><p class="indent" >   Let us focus on the temperatures in Summer (that is the third season, July through September) at sea level (that
is the first level). To plot these in a Mollweide projection we use:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-39">
grdimage&#x00A0;-Rg&#x00A0;-JW180/9i&#x00A0;~otemp.anal1deg.nc?otemp[2,0]~&#x00A0;-Cotemp.cpt&#x00A0;-Bg30&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x003E;&#x00A0;otemp.ps
</div>
<!--l. 1723--><p class="nopar" >
</p><!--l. 1726--><p class="indent" >   The addition <span class="underline">?otemp[2,0]</span> indicates which variable to retrieve from the netCDF file (otemp) and that we need
the third time step and first level. The numbering of the time steps and levels starts at zero, therefore <span class="underline">[2,0]</span>. Make
sure to put the whole file name within quotes since the characters <span class="obeylines-h"><span class="verb"><span 
class="pcrr8t-">?</span></span></span>, <span class="obeylines-h"><span class="verb"><span 
class="pcrr8t-">[</span></span></span> and <span class="obeylines-h"><span class="verb"><span 
class="pcrr8t-">]</span></span></span> have special meaning in
Unix.
</p><!--l. 1732--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">4.4.1    </span> <a 
 id="x1-560004.4.1"></a>Exercises</h4>
<a 
 id="dx1-56001"></a>
<!--l. 1735--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-56003x1">Plot the temperatures for Spring at 5000 m depth. (Hint: use <span class="underline">ncdump -v level</span> to figure out what level
   number that is).
   </li>
   <li 
  class="enumerate" id="x1-56005x2">Include a color scale at the bottom of the plot.
   </li></ol>
<a 
 id="dx1-56006"></a>
<!--l. 1745--><p class="noindent" >
</p>
   <h3 class="sectionHead"><span class="titlemark">4.5    </span> <a 
 id="x1-570004.5"></a>Perspective views</h3>
<a 
 id="dx1-57001"></a>
<!--l. 1748--><p class="noindent" >Our final undertaking in this tutorial is to examine three-dimensional perspective views. <a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;is
currently limited to vantage points at infinity; thus we are unable to do fly-by&#8217;s through canyons etc. The
<a 
href="http://gmt.soest.hawaii.edu" ><span 
class="ptmb8t-">GMT</span></a>&#x00A0;module that produces perspective views of gridded data files is <a 
href="../html/man/grdview.html" ><span 
class="phvb8t-">grdview</span></a><a 
 id="dx1-57002"></a>. It can make two kinds of
plots:
</p><!--l. 1754--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-57004x1">Mesh or wire-frame plot (with or without superimposed contours)
   </li>
   <li 
  class="enumerate" id="x1-57006x2">Color-coded surface (with optional shading, contours, or draping).
   </li></ol>
<!--l. 1762--><p class="indent" >   Regardless of plot type, some arguments must be specified; these are
</p><!--l. 1764--><p class="indent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-57008x1"><span 
class="ptmri8t-">relief_file</span>; a gridded data set of the surface.
   </li>
   <li 
  class="enumerate" id="x1-57010x2"><span 
class="pcrb8t-">-J </span>for the desired map projection.
                                                                                 

                                                                                 
   </li>
   <li 
  class="enumerate" id="x1-57012x3"><span 
class="pcrb8t-">-JZ</span><span 
class="ptmri8t-">height </span>for the vertical scaling.
   </li>
   <li 
  class="enumerate" id="x1-57014x4"><span 
class="pcrb8t-">-E</span><span 
class="ptmri8t-">azimuth</span>/<span 
class="ptmri8t-">elevation </span>for vantage point.
   </li></ol>
<!--l. 1777--><p class="indent" >   In addition, some options may be required:
</p>
   <div class="table">
                                                                                 

                                                                                 
<!--l. 1779--><p class="indent" >   <a 
 id="x1-57015r5"></a></p><hr class="float" /><div class="float" 
>
                                                                                 

                                                                                 
<div class="tabular"> <table id="TBL-19" class="tabular" 
cellspacing="0" cellpadding="0" rules="groups" 
><colgroup id="TBL-19-1g"><col 
id="TBL-19-1" /></colgroup><colgroup id="TBL-19-2g"><col 
id="TBL-19-2" /></colgroup><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-1-"><td  style="text-align:center; white-space:nowrap;" id="TBL-19-1-1"  
class="td11">  <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Option</span></div>  </td><td  style="text-align:center; white-space:nowrap;" id="TBL-19-1-2"  
class="td11">                             <div class="multicolumn"  style="text-align:center; white-space:nowrap;"><span 
class="ptmri8t-x-x-90">Purpose</span></div>
</td></tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-2-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-2-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-C</span><span 
class="ptmri8t-x-x-90">cptfile       </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-2-2"  
class="td11"><span 
class="ptmr8t-x-x-90">The </span><span 
class="ptmri8t-x-x-90">cptfile </span><span 
class="ptmr8t-x-x-90">is required for color -coded surfaces and for contoured mesh plots                               </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-3-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-3-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-G</span><span 
class="ptmri8t-x-x-90">drape_file</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-3-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Assign colors using </span><span 
class="ptmri8t-x-x-90">drape_file </span><span 
class="ptmr8t-x-x-90">instead of </span><span 
class="ptmri8t-x-x-90">relief_file                                                                         </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-4-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-4-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-I</span><span 
class="ptmri8t-x-x-90">intens_file</span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-4-2"  
class="td11"><span 
class="ptmr8t-x-x-90">File with illumination intensities                                                                                                      </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-5-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-5-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Qm      </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-5-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Selects mesh plot                                                                                                                              </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-6-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-6-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Qs</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">m</span><span 
class="ptmr8t-x-x-90">]        </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-6-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Surface plot using polygons; append </span><span 
class="ptmb8t-x-x-90">m </span><span 
class="ptmr8t-x-x-90">to show mesh. This option allows for </span><span 
class="pcrb8t-x-x-90">-W           </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-7-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-7-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-Qi</span><span 
class="ptmri8t-x-x-90">dpi</span><span 
class="ptmr8t-x-x-90">[</span><span 
class="ptmb8t-x-x-90">g</span><span 
class="ptmr8t-x-x-90">]    </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-7-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Image by scan-line conversion. Specify </span><span 
class="ptmri8t-x-x-90">dpi</span><span 
class="ptmr8t-x-x-90">; append </span><span 
class="ptmb8t-x-x-90">g </span><span 
class="ptmr8t-x-x-90">to force gray-shade image. </span><span 
class="pcrb8t-x-x-90">-B </span><span 
class="ptmr8t-x-x-90">is disabled.</span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-8-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-8-1"  
class="td11"><span 
class="pcrb8t-x-x-90">-W</span><span 
class="ptmri8t-x-x-90">pen           </span></td><td  style="text-align:left; white-space:nowrap;" id="TBL-19-8-2"  
class="td11"><span 
class="ptmr8t-x-x-90">Draw contours on top of surface (except with </span><span 
class="pcrb8t-x-x-90">-Qi</span><span 
class="ptmr8t-x-x-90">)                                                                        </span></td>
</tr><tr 
class="hline"><td><hr /></td><td><hr /></td></tr><tr  
 style="vertical-align:baseline;" id="TBL-19-9-"><td  style="text-align:left; white-space:nowrap;" id="TBL-19-9-1"  
class="td11">         </td></tr></table></div>
<br /><div class="caption" 
><span class="id">Table&#x00A0;4.5: </span><span  
class="content">The most useful options in <a 
href="../html/man/grdview.html" ><span 
class="phvb8t-">grdview</span></a><a 
 id="dx1-57016"></a>.</span></div><!--tex4ht:label?: x1-57015r5 -->
                                                                                 

                                                                                 
   </div><hr class="endfloat" />
   </div>
   <h4 class="subsectionHead"><span class="titlemark">4.5.1    </span> <a 
 id="x1-580004.5.1"></a>Mesh-plot</h4>
<a 
 id="dx1-58001"></a>
<!--l. 1799--><p class="noindent" >Mesh plots work best on smaller data sets. We again use the small subset of the ETOPO5 data over Bermuda and
make a quick-and-dirty cpt file:
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-40">
grd2cpt&#x00A0;bermuda.nc&#x00A0;-Cocean&#x00A0;&#x003E;&#x00A0;bermuda.cpt
</div>
<!--l. 1805--><p class="nopar" >
</p><!--l. 1808--><p class="indent" >   A simple mesh plot can therefore be obtained with
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-41">
grdview&#x00A0;bermuda.nc&#x00A0;-JM5i&#x00A0;-P&#x00A0;-JZ2i&#x00A0;-E135/30&#x00A0;-B2&#x00A0;-Cbermuda.cpt&#x00A0;&#x003E;&#x00A0;map.ps
</div>
<!--l. 1812--><p class="nopar" >
</p><!--l. 1816--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-590004.5.1"></a>Exercises</h5>
<a 
 id="dx1-59001"></a>
<!--l. 1819--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-59003x1">Select another vantage point and vertical height.
   </li></ol>
<a 
 id="dx1-59004"></a>
<!--l. 1826--><p class="noindent" >
</p>
   <h4 class="subsectionHead"><span class="titlemark">4.5.2    </span> <a 
 id="x1-600004.5.2"></a>Color-coded view</h4>
<!--l. 1828--><p class="noindent" >We will make a perspective, color-coded view of the US Rockies from the southeast. This is done
using
                                                                                 

                                                                                 
</p>
   <div class="verbatim" id="verbatim-42">
grdview&#x00A0;us.nc&#x00A0;-JM6i&#x00A0;-E135/35&#x00A0;-Qi50&#x00A0;-Ius_i.nc&#x00A0;-Ctopo.cpt&#x00A0;-V&#x00A0;-B2&#x00A0;\
&#x00A0;<br />&#x00A0;&#x00A0;&#x00A0;&#x00A0;-JZ0.5i&#x00A0;&#x003E;&#x00A0;view.ps
</div>
<!--l. 1834--><p class="nopar" >
</p><!--l. 1837--><p class="noindent" >This plot is pretty crude since we selected 50 dpi but it is fast to render and allows us to try alternate values for
vantage point and scaling. When we settle on the final values we select the appropriate <span 
class="ptmri8t-">dpi </span>for the final output
device and let it rip.
</p><!--l. 1843--><p class="noindent" >
</p>
   <h5 class="subsubsectionHead"><a 
 id="x1-610004.5.2"></a>Exercises</h5>
<a 
 id="dx1-61001"></a>
<!--l. 1846--><p class="noindent" >
   </p><ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-61003x1">Choose another vantage point and scaling.
   </li>
   <li 
  class="enumerate" id="x1-61005x2">Redo <a 
href="../html/man/grdgradient.html" ><span 
class="phvb8t-">grdgradient</span></a><a 
 id="dx1-61006"></a> with another illumination direction and replot.
   </li>
   <li 
  class="enumerate" id="x1-61008x3">Select a higher <span 
class="ptmri8t-">dpi</span>, e.g., 200.
   </li></ol>
<a 
 id="dx1-61009"></a>
                                                                                 

                                                                                 
   <h2 class="chapterHead"><span class="titlemark">Chapter&#x00A0;5</span><br /><a 
 id="x1-620005"></a>References</h2>
   <ol  class="enumerate1" >
   <li 
  class="enumerate" id="x1-62002x1">Smith, W.H.F., and P. Wessel, Gridding with continuous curvature splines in tension, <span 
class="ptmri8t-">Geophysics</span>, <span 
class="ptmri8t-">55</span>,
   293&#8211;305, 1990.
   </li>
   <li 
  class="enumerate" id="x1-62004x2">Wessel, P., and W.H.F. Smith, Free software helps map and display data, <span 
class="ptmri8t-">EOS Trans. AGU</span>, <span 
class="ptmri8t-">72</span>, 441,
   1991.
   </li>
   <li 
  class="enumerate" id="x1-62006x3">Wessel, P., and W.H.F. Smith, New version of the Generic Mapping Tools released, <span 
class="ptmri8t-">EOS Trans. AGU</span>,
   <span 
class="ptmri8t-">76</span>, 329, 1995.
   </li>
   <li 
  class="enumerate" id="x1-62008x4">Wessel, P., and W.H.F. Smith, A global, self-consistent, hierarchical, high-resolution shoreline database,
   <span 
class="ptmri8t-">J. Geophys. Res.</span>, <span 
class="ptmri8t-">101</span>, 8741&#8211;8743, 1996.
   </li>
   <li 
  class="enumerate" id="x1-62010x5">Wessel, P., and W.H.F. Smith, New, improved version of the Generic Mapping Tools released, <span 
class="ptmri8t-">EOS</span>
   <span 
class="ptmri8t-">Trans. AGU</span>, <span 
class="ptmri8t-">79</span>, 579, 1998.
   </li>
   <li 
  class="enumerate" id="x1-62012x6">Wessel, P., and W.H.F. Smith, The Generic Mapping Tools Technical Reference and Cookbook, <span 
class="ptmri8t-">Version</span>
   <span 
class="ptmri8t-">4.5.11</span>, pp. 227, 2013.
   </li></ol>
                                                                                 

                                                                                 
   <div class="footnotes"><!--l. 467--><p class="indent" >      <span class="footnote-mark"><a 
href="#fn1x1-bk" id="fn1x1"><sup class="textsuperscript">1</sup></a></span><span 
class="ptmr8t-x-x-80">See </span><span 
class="ptmri8t-x-x-80">Wessel and Smith </span><span 
class="ptmr8t-x-x-80">[1996].</span></p>
<!--l. 1311--><p class="indent" >        <span class="footnote-mark"><a 
href="#fn2x3-bk" id="fn2x3"><sup class="textsuperscript">2</sup></a></span><span 
class="ptmr8t-x-x-80">The </span><span 
class="pcrb8t-x-x-80">-A</span><span 
class="ptmr8t-x-x-80">option is necessary for geographic grids since </span><span 
class="ptmri8t-x-x-80">x_inc </span><span 
class="ptmr8t-x-x-80">shrinks with latitude. Rule of thumb: set </span><span 
class="ptmri8t-x-x-80">aspect </span><span 
class="ptmr8t-x-x-80">= cosine of the average</span>
<span 
class="ptmr8t-x-x-80">latitude.</span></p>                                                                                                                                                                                                       </div>
 
</body></html>