Makecpt qestion

Can’t quite get makecpt to do what I want.
Am creating grid files with data going from 0 up to some variable number x. I want to plot (via grdimage) all data except the zeroes with a palette (say “cool”) that goes from zero to x. ie. Leave all zeroes as “white”.
Have tried setting the zeroes to NaN as I created the grid file (xyz2grd -di0) - that didn’t work.
I can manually edit the .cpt file each time but would like to be able to do it automatically as I create the file.

Its very easy to make small step changes or offset ramps like that with my CPT Designer program:

Simplest would be to set the zeros to NaN as you describe. What is not working about that + grdimage -Q?

1 Like

I had altered the -R values in xyz2grd. However these were incompatible with the -I setting causing xyz2grd to not work. But xyz2grd gives no error message at all so I didn’t realise the grid file was not being updated (could this be looked into?).
Once the -R -I problem was fixed, I used NaNs as suggested.

Sure, send me your bad -R -I combo. I think GMT defaults kick in to make it “work” which may not be what you meant.

Sorry for the delay. Got sidetracked.

Did some testing. Not an issue with the -R -I combination. GMT seems to handle that as you said.

Found that (with xyz2grd) -fg produces output but -fiog does not.