pygmt.clib.Session.get_default

Session.get_default(name)[source]

Get the value of a GMT default parameter (library version, paths, etc).

Possible default parameter names include:

  • "API_VERSION": The GMT API version

  • "API_PAD": The grid padding setting

  • "API_BINDIR": The binary file directory

  • "API_SHAREDIR": The share directory

  • "API_DATADIR": The data directory

  • "API_PLUGINDIR": The plugin directory

  • "API_LIBRARY": The core library path

  • "API_CORES": The number of cores

  • "API_IMAGE_LAYOUT": The image/band layout

  • "API_GRID_LAYOUT": The grid layout

  • "API_BIN_VERSION": The GMT binary version (with git information)

Parameters

name (str) – The name of the default parameter (e.g., "API_VERSION")

Returns

value (str) – The default value for the parameter.

Raises

GMTCLibError – If the parameter doesn’t exist.