Help with displaying graticules inside the map frame

Gulf_Guinea_map_legend.txt (317 Bytes)

I am trying to recreate the attached map which I have unfortunately lost its script. My challenge now is I have forgotten how to get the graticules of the inset to show. I can’t attach the sounding data due to its huge size. Below is the script I have been able to reproduce so far:

gmt begin Gulf_Guinea_map png

gmt set FONT_ANNOT_PRIMARY 8p,Helvetica,black
gmt set FONT_ANNOT_SECONDARY 8p,Helvetica,black
gmt set FONT_LABEL 10p,Helvetica,black
gmt set FONT_TITLE 10p,Helvetica,black
gmt set MAP_TITLE_OFFSET 0.1c

gmt coast -JM6i -R-150/60/-60/60 -Ggray -Slightblue -Dc -Wthinnest ^
-Bx60 -By30 -N1 -Lg25/-55+c0+w5000k+f+ar+lkm ^
gmt plot Wholeregion_sounding.txt -Sc0.02c 

	gmt inset begin -DjTL+w9c/7c+o0.35c/0.25c -F+gwhite+p1p+c0.1c+s
		gmt coast -JM? -R-17/6/-6/12 -Ggray -Slightblue -Df -Wthin ^
		-EGH,NG,CI,TG,CM,BJ,CG,GA,GN,GW,LR,ST,SL,GQ+gdarkbrown -BSWne ^
		-Bx5 -By5 -N1 -Bg5 
		gmt plot Wholeregion_sounding.txt -Sc0.02c 
	gmt inset end

gmt legend -DjBL+w4.2c/3.0c+o0.35c/0.1c -F+p1p+gwhite+s -C0.3c/0.4c Gulf_Guinea_map_legend.txt

gmt end show

Hi @richannan, thanks for joining in on the PyGMT Zoom call just now!

So to answer your question, what you need to set is MAP_FRAME_TYPE to ‘inside’. Since it is for the inset map only, do gmt set after gmt inset begin like so:

gmt inset begin ...
    gmt set MAP_FRAME_TYPE inside
gmt inset end

Let us know if that works :smiley:

Hello bro @weiji14. Thanks very much for the help. It is working perfectly. Sorry for the delayed response, I was waiting on my email app to notify me of any response to my question.

I want to ask one other question: do you know if a colorbar can be rotated or slanted at an angle?

Once again, thanks for the help.

There is no option to rotate a colorbar, but it is possible you can simulate it with -prot and perhaps -X -Y settings.