Psbasemap grid line

I am using GMT 5, and I want to create a map with grid lines using the script below. However, the result has grid lines with two colors, black and white, while I want only the lines without any colors. How can I get just grid lines without color strip white and black



gmt makecpt -Cpolar -T-0.5/0.5/0.1 -Z -D > $fcI



#echo “-10000 200 10000 200” > gray.cpt
gmt grdcut $GEBCO -R$RR -GGRAY
gmt psbasemap -JM$FS -R$RR -B$BO -K > $PS_NAME
gmt grdgradient GRAY -Nt1 -A45 -GGRAY_i
gmt grdimage GRAY -IGRAY_i -R$RR -JM$FS -Cgray.cpt -K -O >> $PS_NAME
gmt grdimage $LOS -R$RR -JM$FS -C$fcI -Q -K -O >> $PS_NAME
gmt pscoast -JM$FS -R$RR -B$BO -L$SCALE -Df -Swhite -W0.3 -K -O >> $PS_NAME
gmt psscale -C$fcI -Dx0.5c/5c+w2.5c/0.2c+v -Bxaf -By+l"(m)" -K -O >> $PS_NAME
gmt psxy $LB -R$RR -JM$FS -W0.7,red -K -O >> $PS_NAME

echo “115.85 -8.27 0 3 0 0 utara” | gmt psvelo -R$RR -JM$FS -W5,black -Gblack -A0.12/0.16/0.12 -Se0.2/0.05 -K -O >> $PS_NAME
echo “115.85 -8.2 U” | gmt pstext -R$RR -JM$FS -F+f12p,Helvetica -O >> $PS_NAME

gmt psconvert $PS_NAME -Tj -A

The results of script (focus on grid line)

The results that I want (focus on grid line)

Think you are confusing the names of things. Gridlines are set via the g-directive to -B, e.g. -Bg5, which you are not using, but looks like you are talking about the base frame checkerboard black/white pattern. That is controlled with MAP_FRAME_TYPE and is by default fancy. Set to plain for just a black outline.

thankyou it’s solved.
I want to ask another question, I have 4 layouts and I want to display in one map.
But in this case the third map is always cut out of the map. How to make 4 layouts in one map without cut?

the format layout that I want is:

layout 1 layout 2
layout 3 layout 4

sorry for very basic question


My script is

script.txt (4.0 KB)

Sory, too much GMT classic mode weed. I would use modern mode and subplot for stuff like this and reduce the code by > 50%. But have no time to do this for you.

try selecting larger paper size:

gmt set PS_MEDIA a3 # or a2 if you need even more space

or learn gmt modern mode.

May I ask if this LOS is an insar line of sight deformation? May I ask how you generated this grd file using xyz2grd. Thank you!