How to set the colors of NaN with grdview?

The issue of using NaN colors in grdview is probably something that could be improved and revisited. Right now, I get read NaNs only with -Qs (surface) and only without -p. This is due to various if-test checks. For -Q we rasterize the grid to an image and set the image pixels to whatever color (but not the NaN color).

I suspect we will need a modifier or option to insist that we use the NaN color, whatever it is, on the NaN pixels or NaN nodes or NaN patches. Perhaps the simplest syntax might be a new modifier +n to -Q which says "paint any NaN node or pixel with the NaN color in the CPT (requires -C)?

1 Like