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

I’m able to plot my first GMT map:

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:

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.

Hi @joa-quim,

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

Enjoy your Friday.

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.

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)


Wow, works like a charm! Thank you so much :+1: