# How to set the projection for Earth relief grid based maps in GMT?

**URL:** <https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625>\
**Category:** General Usage\
**Tags:** question, gmt\
**Created:** [October 29, 2021, 2:42pm UTC](https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625 "2021-10-29T14:42:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 29, 2021, 2:42pm UTC](https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625/1 "2021-10-29T14:42:52Z")

</div>

I’m able to plot my first GMT map:

```julia
using GMT
grdimage("@earth_relief_10m", region=(180,320,10,80), coast=true, fmt=:png, show=true)

```

My goal is to set its projection to `lambert`. I tried to add the below argument to the script but it gives me an error:  
`proj=:lambert,`

What is the proper way to set its projection?

BTW, is it possible to set the color of the ocean white? I need to plot my filled contours over there, and they do not cover the whole ocean. Blue will be part of my colormap.

Many thanks.

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 29, 2021, 5:34pm UTC](https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625/2 "2021-10-29T17:34:42Z")

</div>

Hi @joa-quim,

Sorry to bother you again. I wonder if you know the answers to my questions as above?

Enjoy your Friday.

---

<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:** [October 29, 2021, 6:11pm UTC](https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625/3 "2021-10-29T18:11:07Z")

</div>

You must consult the link I sent you before on how to set the projections that need parameters (like _lambert conic_). It’s hard to catch user errors before it goes into the GMT lib (where they are actually caught).

One way would be to tell the `coast` module to paint oceans in white (shown bellow). The other would be to create a color map where all negative values are painted as the background colors and set that bg color to white.

Further you go into the details, more effort needs to be expended reading the docs. The ones in GMT.jl are limitted and often one need to go for the _mother library_.

```julia
grdimage("@earth_relief_10m", region=(180,320,10,80)
         proj=(name=:lambertConic, center=[-105 35], parallels=[33 45]),
         coast=(coast=true, water=:white), show=true)

```

 ![GMTjl_tmp-fs8](https://global.discourse-cdn.com/julialang/original/3X/3/1/31c828059bff14c87bb539125ec391ad4d24d41a.png)

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 29, 2021, 6:22pm UTC](https://discourse.julialang.org/t/how-to-set-the-projection-for-earth-relief-grid-based-maps-in-gmt/70625/4 "2021-10-29T18:22:41Z")

</div>

Wow, works like a charm! Thank you so much 👍
