Colouring a bathymetry plot based on the slope degrees

Dear GMT developers and users,

Any idea how to colour a bathymetry plot based on their slope degrees like the one attached?

Help is greatly appreciated
Rino

bathymetry_slopes.pdf (156.9 KB)

You can create a slope grid from the bathymetry with these commands:

gmt grdgradient Bath.nc -D -Stemp_grid -fg
gmt grdmath temp_grid.nc ATAN R2D = SlopeGrid.nc

It works. Thank you.