You can get your figure is you set the theme to classic. I think that the issue the modern mode uses the auto theme.
gmt basemap -Rd -JQ5i -Bafg --MAP_GRID_PEN=4p,black,dotted --GMT_THEME=classic -png test2
You can get your figure is you set the theme to classic. I think that the issue the modern mode uses the auto theme.
gmt basemap -Rd -JQ5i -Bafg --MAP_GRID_PEN=4p,black,dotted --GMT_THEME=classic -png test2