Installing GMT Mapping tools onto Ubuntu.

Thankfully it exists as a package so you can grab it via apt-get.  I suggest grabbing the tutorial and examples at the sametime.

sudo apt-get install gmt gmt-examples gmt-tutorial-pdf

Simples….

Ok, now lets try and run a test. Create the following in a file called linproj.sh. Personally I have a folder called GMTplotting for this file but you may prefer to arrange it differently.

#!/bin/bash 

psbasemap -R10/70/-3/8 -JX4i/3i -B10/1:."My first plot": -P > plot.ps

You can now run this script using ./linproj.sh providing it has executable rights if not just type chmod +x linproj.sh.

Now if you are running certain flavours of unix you will get an error telling you that psbasemap: command not found. This is normal – just add GMT before psbasemap.

First Plot

The second test is to try

psbasemap -R1/10000/1e20/1e25 -JX9il/6il \
-B2:"Wavelength (m)":/a1pf3:"Power (W)":WS > plot.p

Have fun!!

One Comment on “GMT Mapping Tools”

  1. thanks a lot for the explanation its help me.
    i would like change this GMT pscoast to just pscoast
    best regards

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.