# Grdview overlaying grey

**URL:** <https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920>\
**Category:** Q&A\
**Tags:** gmt\
**Created:** [May 22, 2024, 12:20pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920 "2024-05-22T12:20:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncwxpanther](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@ncwxpanther](https://forum.generic-mapping-tools.org/u/ncwxpanther)\
**Post date:** [May 22, 2024, 12:20pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920/1 "2024-05-22T12:20:11Z")

</div>

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

```auto
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](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/f/f36d78208cde686cde81ec1ec5d5d01f84ac9efb.png)

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

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [May 22, 2024, 12:36pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920/2 "2024-05-22T12:36:37Z")

</div>

Please, this is not a **GMT.jl** question

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [May 22, 2024, 1:11pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920/3 "2024-05-22T13:11:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mkononets](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/mkononets/32/4029_2.png) [@mkononets](https://forum.generic-mapping-tools.org/u/mkononets)\
**Post date:** [May 22, 2024, 2:59pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920/4 "2024-05-22T14:59:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ncwxpanther](https://avatars.discourse-cdn.com/v4/letter/n/8e7dd6/32.png) [@ncwxpanther](https://forum.generic-mapping-tools.org/u/ncwxpanther)\
**Post date:** [May 22, 2024, 3:02pm UTC](https://forum.generic-mapping-tools.org/t/grdview-overlaying-grey/4920/5 "2024-05-22T15:02:20Z")

</div>

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

Thanks
