pygmt.makecpt

pygmt.makecpt(**kwargs)[source]

Creates a static color palette table (CPT).

Full option list at https://docs.generic-mapping-tools.org/latest/makecpt.html

Aliases:

  • C = cmap

  • G = truncate

  • H = output

  • I = reverse

  • T = series

  • Z = continuous

Parameters
  • (C) (cmap) – Selects the master color palette table (CPT) to use in the interpolation. Full list of built-in color palette tables can be found at https://docs.generic-mapping-tools.org/latest/cookbook/cpts.html#built-in-color-palette-tables-cpt.

  • (T) (series) – [min/max/inc[+b|l|n]|file|list]. Defines the range of the new CPT by giving the lowest and highest z-value (and optionally an interval). If this is not given, the existing range in the master CPT will be used intact.

  • (G) (truncate) – zlo/zhi. Truncate the incoming CPT so that the lowest and highest z-levels are to zlo and zhi. If one of these equal NaN then we leave that end of the CPT alone. The truncation takes place before any resampling. See also https://docs.generic-mapping-tools.org/latest/cookbook/features.html#manipulating-cpts.

  • (H) (output) – Optional. The file name with extension .cpt to store the generated CPT file. If not given or False (default), saves the CPT as the session current CPT.

  • (I) (reverse) – Set this to True or c [Default] to reverse the sense of color progression in the master CPT. Set this to z to reverse the sign of z-values in the color table. Note that this change of z-direction happens before -G and -T values are used so the latter must be compatible with the changed z-range. See also https://docs.generic-mapping-tools.org/latest/cookbook/features.html#manipulating-cpts.

  • (Z) (continuous) – Creates a continuous CPT [Default is discontinuous, i.e., constant colors for each interval]. This option has no effect when no -T is used, or when using -Tz_min/z_max; in the first case the input CPT remains untouched, in the second case it is only scaled to match the range z_min/z_max.