Skip to content
Generic Mapping Tools Library Wrapper for Julia
Jupyter Notebook Julia
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
docs
src
test
.gitignore
.travis.yml
LICENSE.md
Project.toml
README.md
REQUIRE
WL_Example_II.ipynb
WL_Example_III.ipynb
WL_example_3.pdf
WL_example_I.ipynb
appveyor.yml

README.md

GMT.jl

Julia wrapper for the Generic Mapping Tools GMT

Documentation Build Status (Julia 1.2) Discourse Forum

The Generic Mapping Tools, GMT, is an open source collection of tools for manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing PostScript illustrations ranging from simple x–y plots via contour maps to artificially illuminated surfaces and 3D perspective views. This link will take you to an impressive collection of figures made with GMT

This wrapper works with GMT5.3.1 and above and it is intended not only to access to GMT from within the Julia language but also to provide a more modern interface to the GMT modules. For example, instead of using the GMT classic syntax to do a line plot:

gmt psxy filename -R0/10/0/5 -JX12 -W1p -Ba -P > psfile.ps

one can simply do:

plot("filename", show=true)

or, more verbose but easier to read

coast(region=:global, proj=:Winkel, frame=:g, area=10000,
      land=:burlywood4, water=:wheat1, figsize=12, show=true)

instead of

gmt coast -Rd -JR12 -Bg -Dc -A10000 -Gburlywood4 -Swheat1 -P > GMT_winkel.ps

to show

Install

]add GMT

A word of warning about the installation. The GMT.jl Julia wrapper does NOT install the GMT program. It's the user responsability to do that.

On OSX, with a manual GMT build and dependencies obtained with Homebrew (that are installed at /user/local/lib), I had to help Julia finding MY libgmt.dylib, with (this line should than be added to the ~/.julia/config/startup.jl file)

push!(Libdl.DL_LOAD_PATH, "/Users/j/programs/gmt5/lib")

Using

The GMT Julia wrapper was designed to work in a way the close as possible to the command line version and yet to provide all the facilities of the Julia language. In this sense, all GMT options are put in a single text string that is passed, plus the data itself when it applies, to the gmt() command. However, we also acknowledge that not every one is comfortable with the GMT syntax. This syntax is needed to accommodate the immense pool of options that let you control all details of a figure but that also makes it harder to read/master.

To make life easier we provide also a new mechanism that use the GMT module name directly and where the program's options are set via keyword arguments. While the monolotic way of using this package is robust and keeps being updated to latestes GMT developments, this By modules alternative is a Work In Progress (the GMT supplements were not ported yet) and some things may not work yet. So all help is most than wellcome.

Documentation

Latest Docs

Examples

Some examples

License

The GMT.jl is free software: you can redistribute it and/or modify it under the terms of the MIT "Expat" License. A copy of this license is provided in LICENSE.txt

You can’t perform that action at this time.