How GMT.jl works: Monolithic vs. Module-based interfaces
masterGMT.jl provides two distinct ways to interact with the Generic Mapping Tools:
1. Monolithic Interface (Recommended)
This approach stays close to the GMT command-line syntax. All GMT options are passed as a single text string to the gmt() command, along with any necessary data. This is the most robust method and is updated immediately as new GMT features are released.
2. Module-based Interface (Work in Progress)
This modern interface allows you to call GMT modules directly as Julia functions and set options using keyword arguments. While more readable and 'Julia-native', it is currently a work in progress; some GMT supplements have not yet been ported, and certain features may not work as expected.
Example of the modern interface:
Instead of the classic syntax:
gmt coast -Rd -JR12 -Bg -Dc -A10000 -Gburlywood4 -Swheat1 -P > GMT_winkel.ps
You can use the module-based approach:
coast(region=:global, proj=:Winkel, frame=:g, area=10000, land=:burlywood4, water=:wheat1, show=true)coast(region=:global, proj=:Winkel, frame=:g, area=10000, land=:burlywood4, water=:wheat1, show=true)