pygmt.clib.Session.get_enum

Session.get_enum(name)[source]

Get the value of a GMT constant (C enum) from gmt_resources.h.

Used to set configuration values for other API calls. Wraps GMT_Get_Enum.

Parameters:

name (str) – The name of the constant (e.g., "GMT_SESSION_EXTERNAL").

Return type:

int

Returns:

value – Integer value of the constant. Do not rely on this value because it might change.

Raises:

GMTCLibError – If the constant doesn’t exist.