# pygmt.Figure.coast(shorelines) - how to smooth

**URL:** <https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779>\
**Category:** PyGMT Q&A\
**Created:** [June 11, 2021, 9:33pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779 "2021-06-11T21:33:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arleaman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/arleaman/32/1339_2.png) [@arleaman](https://forum.generic-mapping-tools.org/u/arleaman)\
**Post date:** [June 11, 2021, 9:33pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779/1 "2021-06-11T21:33:03Z")

</div>

I would like to smooth the jagged edges (_visible in figure at bottom of page_) in the high resolution shorelines produced using pyGMT.

I have attempted to smooth the shorelines by adapting GMT syntax with little success. My code:

```python
fig = pygmt.Figure()
fig.coast(resolution='h', borders=['1/1.5p', '2/0.5p'], shorelines='1/1+s', area_thresh='1000'),
PS_LINE_CAP='round',
PS_LINE_JOIN='round',
fig.show()

```

Please let me know if you have any suggestions!

 ![Screen Shot 2021-06-11 at 3.13.23 PM](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/1/1f1807e4f88a5af7ce1968a464b407555a0e48d2.jpeg)

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [June 12, 2021, 2:04am UTC](https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779/2 "2021-06-12T02:04:27Z")

</div>

Have you try using a lower resolution for the coast data?

---

<div class="post-metadata">

**Author:** ![weiji14](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/weiji14/32/33_2.png) [@weiji14](https://forum.generic-mapping-tools.org/u/weiji14)\
**Post date:** [June 15, 2021, 7:23pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779/3 "2021-06-15T19:23:58Z")

</div>

Hi @arleaman, as @Esteban82 mentioned, you can try using a lower resolution coastline using the `resolution` parameter in `fig.coast`. I.e.:

```python
fig.coast(resolution='c', ...)

```

where `c` stands for crude resolution. Refer to [https://www.pygmt.org/v0.3.1/api/generated/pygmt.Figure.coast.html](https://www.pygmt.org/v0.3.1/api/generated/pygmt.Figure.coast.html).

If you’re interested in using `PS_LINE_CAP` and `PS_LINE_JOIN`, you can do so using [`pygmt.config`](https://www.pygmt.org/v0.3.1/api/generated/pygmt.config.html#pygmt.config) like so:

```python
with pygmt.config(PS_LINE_CAP="round", PS_LINE_JOIN="round"):
    fig.coast(...)

```

Hopefully that helps! Feel free to show us your final map if you get it to work 😄

---

<div class="post-metadata">

**Author:** ![arleaman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/arleaman/32/1339_2.png) [@arleaman](https://forum.generic-mapping-tools.org/u/arleaman)\
**Post date:** [June 24, 2021, 8:53pm UTC](https://forum.generic-mapping-tools.org/t/pygmt-figure-coast-shorelines-how-to-smooth/1779/4 "2021-06-24T20:53:26Z")

</div>

Thank you @weiji14! Adjusting the config settings worked perfectly!

 ![Screen Shot 2021-06-24 at 2.52.13 PM](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/3/31c19dbc6201887d8dbe2b75e6904a3b46f415a1.png)
