Grdview overlaying grey

Using GMT 5.4.4 I am successfully able to create a gridded image using the below redacted code:

gmt xyz2grd input.txt -: -R-128/-50/3/60 -Ginput.g -I5k
gmt psxy -R-128/-50/3/60 -Jb-96/23/29.5/45.5/.55c Mexico.poly -G214/214/214 -X-4.5 -Y-8.5 --PS_PAGE_COLOR=148/148/148 --PS_MEDIA=a4 -K > output.ps
gmt psxy -R-128/-50/3/60 -Jb-96/23/29.5/45.5/.55c Canada.poly -G214/214/214 -K -O >> output.ps
gmt grdview -Ts input.g -Jx1 -R-128/-50/3/60 -Ccolor.cpt -O -K >> output.ps
gmt psxy -Jb-96/23/29.5/45.5/.55c -R-128/-50/3/60 US.poly -W0.4p,0/0/0 -K -O >> output.ps
convert -trim -flatten -density 300 -rotate 90 -geometry 650x475! +repage output.ps output.png

However the code is not performing the same using GMT 6.4. I believe I have narrowed down the issue with the grdview command. That command is overlaying most of the image with a light grey color which is not wanted.
Capture

Any ideas why this is performing differently on GMT 6? The v6 is running on a Alma Linux 9 server while the v5 is running on RHEL 7

Please, this is not a GMT.jl question

The gray background is coming from your color.cpt that has the (default) setting off painting the NaNs with gray shade 127/127/127. It does the same in GMT5 or GMT6.

1 Like

That’s not the point I suspect

grdview call in the code above specifies transparency for NaNs

It appears to me that syntax for NaN transparency is slightly different in GMT 6 and this way it looks like topic starter wants us to read and explain grdview documentation for him, just like in that pscoast frame thread yesterday.

I was able to successfully generate the image using
gmt grdview -T+s …

Thanks