How to plot points on a map in Julia?

Many thanks for all of your help, I’m almost getting there! Glad to learn so much over the last several days. My goal of this post is to plot my sampling stations onto the map I’m drawing as data points using the Julia version of the GMT, i.e., GMT.jl.

Below is an example from the manual, but it is for drawing a line. I’m not sure if I can choose to draw a symbol only or not?
lines(xy, axes=:af, pen=(1,:red), decorated=(dist=(2.5,0.25), symbol=:star,
symbsize=1, pen=(0.5,:green), fill=:blue, dec2=true), show=true)

Here is my script based on my understanding of the GMT documentation:
xy = hcat(x, y); # x is longitude and y is latitude
GMT(“plot -R180/320/10/80 -Sp xy”);

Unfortunately, I got an error as below:
objects of type Module are not callable.

So what is the proper way to write such a command in Julia?

Many thanks!

You complain about lack of examples but … have you looked at those?


There is even a module called scatter that is specialized to plot symbols only.
1 Like

Many thanks, Joaquim! Scatter served my need nicely. BTW, the examples were really helpful. :grinning: