How to set the width of gridlines (MAP_GRID_PEN_PRIMARY no effect)?

Hi, all. I want to change the width of map gridlines, I modify the MAP_GRID_PEN_PRIMARY to some different value, but no effect.

Here is my code, and my GMT version is 6.2.0.

gmt begin debug-gmt png
gmt set MAP_GRID_PEN_PRIMARY 20p,red,2_2:1
gmt set MAP_GRID_PEN 20p,blue
gmt coast -JM105/35/6.5i -R70/138/13/56 -G244/243/239 -S167/194/223 -B10f5g10
gmt end

try adding the assignment to the coast command eg:
gmt coast -JM105/35/6.5i -R70/138/13/56 -G244/243/239 -S167/194/223 -B10f5g10 --MAP_GRID_PEN=20p,blue

MAP_GRID_PEN sets both MAP_GRID_PEN_PRIMARY and MAP_GRID_PEN_SECONDARY, so your second gmt set call overwrites the first gmt set call. Omit the second gmt set, since you’re not using secondary grid lines, or switch the order of these two lines.

MAP_GRID_PEN_PRIMARY and MAP_GRID_PEN, both are 20p width, this is not the key point of this problem. This problem occurs when the pen setting append “2_2:1”.

This works, thank you.