# How to plot points on a map in Julia?

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-plot-points-on-a-map-in-julia/2256>\
**Category:** GMT.jl Q&A\
**Tags:** gmt\
**Created:** [November 4, 2021, 12:23am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-points-on-a-map-in-julia/2256 "2021-11-04T00:23:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon6j](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@leon6j](https://forum.generic-mapping-tools.org/u/leon6j)\
**Post date:** [November 4, 2021, 12:23am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-points-on-a-map-in-julia/2256/1 "2021-11-04T00:23:23Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [November 4, 2021, 3:04pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-points-on-a-map-in-julia/2256/2 "2021-11-04T15:04:26Z")

</div>

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

> **[AGU · GMT](https://www.generic-mapping-tools.org/GMT.jl/dev/gallery/tables/)**

  
There is even a module called [scatter](https://www.generic-mapping-tools.org/GMT.jl/dev/scatter/) that is specialized to plot symbols only.

---

<div class="post-metadata">

**Author:** ![leon6j](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@leon6j](https://forum.generic-mapping-tools.org/u/leon6j)\
**Post date:** [November 4, 2021, 5:16pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-points-on-a-map-in-julia/2256/3 "2021-11-04T17:16:09Z")

</div>

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