Next: 4.15.2 Regular CPT files Up: 4.15 Color palette tables Previous: 4.15 Color palette tables Contents Index

## 4.15.1 Categorical CPT files

Categorical data are information on which normal numerical operations are not defined. As an example, consider various land classifications (desert, forest, glacier, etc.) and it is clear that even if we assigned a numerical value to these categories (e.g., desert = 1, forest = 2, etc) it would be meaningless to compute average values (what would 1.5 mean?). For such data a special format of the CPT files are provided. Here, each category is assigned a unique key, a color or pattern, and an optional label (usually the category name). Keys must be monotonically increasing but do not need to be consecutive. The format is

key | fill | label
... |  |
key | fill | label

The fill information follows the format given in Section 4.14. While not always applicable to categorical data, the background color (for key-values key), foreground color (for key-values key), and not-a-number (NaN) color (for key-values = NaN) are all defined in the .gmtdefaults4 file, but can be overridden by the statements

B | R | G | B
F | R | G | B
N | R | G | B

Next: 4.15.2 Regular CPT files Up: 4.15 Color palette tables Previous: 4.15 Color palette tables Contents Index