gmt icon indicating copy to clipboard operation
gmt copied to clipboard

grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used

Open vjpbd opened this issue 1 year ago • 2 comments

Description of the problem

In GMT 6.4.0 and earlier, I could use the -Q option at the same time as intensities in the module grdimage. Since GMT 6.5.0, this doesn't work anymore.

Script that generated the error

(Modern mode, Bash script)

gmt makecpt -T-1/1 -Cgray
gmt grdimage $dem_shade
gmt makecpt -C$cpt $cpt_range
gmt grdimage $img -I$dem_shade -nn+a -Q

Full error message

grdimage [ERROR]: Option -Q: Cannot specify a transparent color for grids when intensities are also used

Expected outcome

I use this code to plot a grid, shaded with intensity, over a shaded DEM. The grid contain NaN values and the projection is Lambert. In version 6.4.0 and earlier, I get the following result: crop_good

Actual outcome

In version 6.5.0, I have to remove the -Q option and I get the following result: crop_bad

System information

  • Operating system: Debian Bullseye
  • GMT version: 6.5.0

vjpbd avatar Mar 19 '24 14:03 vjpbd

Can you make a reproducible example. A small one without unnecessary details an no variable? Just plain commands that can be copy-pasted on Windows.

joa-quim avatar Apr 16 '24 23:04 joa-quim

Hello @joa-quim Here is an archive with a minimal example (script, input files and results): example.tar.gz

vjpbd avatar Apr 17 '24 15:04 vjpbd

I have the same issue with GMT 6.5, which is the version that comes with Ubuntu 24.04. However, manually installing 6.6 fixed the issue for me.

jsaul avatar May 13 '25 12:05 jsaul

As @jsaul noted, this issue was fixed with GMT 6.6. I just tried it. Therefore we can consider this issue resolved.

vjpbd avatar Aug 25 '25 15:08 vjpbd