# \[Need help with\] GMT Eumap with lines and dots

**URL:** <https://discourse.julialang.org/t/need-help-with-gmt-eumap-with-lines-and-dots/119607>\
**Category:** New to Julia\
**Tags:** question, plotting, gmt\
**Created:** [September 19, 2024, 1:41pm UTC](https://discourse.julialang.org/t/need-help-with-gmt-eumap-with-lines-and-dots/119607 "2024-09-19T13:41:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elvander](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@Elvander](https://discourse.julialang.org/u/Elvander)\
**Post date:** [September 19, 2024, 1:41pm UTC](https://discourse.julialang.org/t/need-help-with-gmt-eumap-with-lines-and-dots/119607/1 "2024-09-19T13:41:54Z")

</div>

I would like to plot a series of lines and dots on the map of the EU ; I found out how to plot the EU map and plot either (one line) or a bunch of dots, but it is unclear to me how to do both ; I also would like to be able to toggle the colour of each line according to some numeric data (say colour coded from scales of green to red or other temperature map)

Code with one line showing

coast(  
region=“-10/35/4/45+r”,  
proj=(name=:laea, center=[3,39]),  
frame=:ag,  
res=:full,  
area=500,  
shore=:thin,  
rivers=:thin,  
borders=1,

```
# outline spain in red
DCW=((country="ES", 
        pen=(1,:red))),
figsize=50

```

)

latt = bus\_data.x  
long = bus\_data.y

GMT.lines!(  
[long[1],long[1235]],[latt[1],latt[1235]],  
fmt=:png,  
lw=2,  
pen=(1,:red),  
aspect=:equal,  
show=true  
)

code with dots showing

coast(  
region=“-10/35/4/45+r”,  
proj=(name=:laea, center=[3,39]),  
frame=:ag,  
res=:full,  
area=500,  
shore=:thin,  
rivers=:thin,  
borders=1,

```
# outline spain in red
DCW=((country="ES", 
        pen=(1,:red))),
figsize=50

```

)

latt = bus\_data.x  
long = bus\_data.y

# GMT.scatter!( long, latt, fmt=:png, marker=:circle, markeredgecolor=0, size=0.5, markerfacecolor=:cyan, show=true )

But putting both GMT.lines! and GMT.scatter! produces an error

---

<div class="post-metadata">

**Author:** ![lupemba](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@lupemba](https://discourse.julialang.org/u/lupemba)\
**Post date:** [September 20, 2024, 12:42pm UTC](https://discourse.julialang.org/t/need-help-with-gmt-eumap-with-lines-and-dots/119607/2 "2024-09-20T12:42:32Z")

</div>

It is very hard to read the code due to the formatting. Will you please try to make a reply where the code is formatted such that it can be copied into an editor. You can look at other discourse post to see how they post the Minimal Working Examples (MWE).

@joa-quim is the author of GMT.jl and he is normally active on discourse.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 20, 2024, 3:30pm UTC](https://discourse.julialang.org/t/need-help-with-gmt-eumap-with-lines-and-dots/119607/3 "2024-09-20T15:30:10Z")

</div>

You also need to post the error message. And preferably an example that we can reproduce. On a glace I see no obvious error (by ` markeredgecolor=0` you mean ` markeredgecolor=:black`?) but I don’t know what is `long` and `latt`.

The second example [here](https://www.generic-mapping-tools.org/GMTjl_doc/examples/plotting_functions/01_lines/#line_plots) shows how to color lines according some third variable.
