Discrete colormap based on input data categories?

Aloha.

I’m looking for a strategy to make a terrain image that assigns constant colors to elevation data (X, Y, Z, K) where K is a terrain type mapped to a discrete color.

I haven’t tried this with GMT before and, looking at makecpt, it doesn’t jump out at me. I would appreciate any pointers in the right direction.

Mahalo.
J.

Hi :slight_smile:
Makecpt doesn’t need to now what parameter it will color. Just its range.

You can apply the color to your “K” (if it’s a number) instead of “Z” (see -i flag assuming you have column data OR something like file.nc?var1/var2 if it’s gridded)