xycpt - Man Page

generate GMT colour palette table (cpt) files from column data.

Synopsis

xycpt [-b rgb] [-d] [-f rgb] [-h] [-n rgb] [-o path] [-r registration] [-u] [-v] [-V] [-4] [-5] [-6] [path]

Description

The xycpt program generates discrete or continuous cpt files from simple input describing sample values of the colour (or greyscale) range. The input consists of 1–4 columns. For 2 and 4 columns, the first column is interpreted as a (double) z value, for 1 and 3 the z value is taken implicitly. For 1 and 2 columns the final column will be taken as a greyscale value. For 3 and 4, the last 3 columns are taken as RGB values.

The program will read from stdin if a file is not specified as the final argument, and write to stdout if the --output option is not specified.

Options

In the following, all rgb specifications should be of the form red/green/blue where the colour components are integers in the range 0 to 255.

-b,  --background rgb

Set the background colour of the output.

--backtrace-file path

Specify a file to which to write a formatted backtrace. The file will only be created if there is a backtrace created, typically when an error occurs.

--backtrace-format format

Specify the format of the backtrace written to the files specified by --backtrace-file, one of plain, xml or json.

--comments-generate

Create a comment with summary data (the date of creation, name and version of the cptutils package) in the output file.

--comments-read path

Read the comments from the specified path and add them to the output gradient.

The format is simply a plain text multi-line document without any comment delimiters (those will be added by the program).

-d,  --discrete

Output a discrete cpt file, the default is continuous.

-f,  --foreground rgb

Set the foreground colour of the output.

-h,  --help

Brief help.

-n,  --nan rgb

Set the NaN (no data) colour of the output.

-o,  --output path

Write the output to path, rather than stdout.

-r,  --registration string

For discrete (using the --discrete option) conversion, specifies upper, middle or lower registration of the data value. For the upper and lower types the final (respectively the first) colour is omitted from the output; only the z value is used. For middle registration all the colours appear in the output.

-u,  --unit

Colour values are specified as floating point numbers in the range 0–1 rather than as integers in the range 0–255.

-v,  --verbose

Verbose operation.

-V,  --version

Version information.

-4,  --gmt4

Use GMT 4 conventions when writing the cpt output: the colour-model code is uppercase, and the colours are separated by spaces.

This is incompatible with the -5 and -6 options of course.

At present this option is the default, but that will change at some point. So specify this option if your use of the output depends on the GMT 4 layout (consumed by a custom parser, for example).

-5,  --gmt5

Use GMT 5 conventions when writing the cpt output: the colour-model code is lowercase, and the colours are separated by a solidus for RGB, CMYK, by a dash for HSV.

This is incompatible with the -4 and -6 options of course.

-6,  --gmt6

As the -5 option, but allows the HARD_HINGE and SOFT_HINGE directives in place of the explicit HINGE = directive.

This is incompatible with the -4 and -5 options of course.

Author

J.J. Green

Info

9 July 2024 cptutils 1.82 User commands