pygmt.config

class pygmt.config(*, COLOR_BACKGROUND=None, COLOR_FOREGROUND=None, COLOR_CPT=None, COLOR_NAN=None, COLOR_MODEL=None, COLOR_HSV_MIN_S=None, COLOR_HSV_MAX_S=None, COLOR_HSV_MIN_V=None, COLOR_HSV_MAX_V=None, COLOR_SET=None, DIR_CACHE=None, DIR_DATA=None, DIR_DCW=None, DIR_GSHHG=None, FONT_ANNOT_PRIMARY=None, FONT_ANNOT_SECONDARY=None, FONT_HEADING=None, FONT_LABEL=None, FONT_LOGO=None, FONT_SUBTITLE=None, FONT_TAG=None, FONT_TITLE=None, FORMAT_CLOCK_IN=None, FORMAT_CLOCK_OUT=None, FORMAT_CLOCK_MAP=None, FORMAT_DATE_IN=None, FORMAT_DATE_OUT=None, FORMAT_DATE_MAP=None, FORMAT_GEO_OUT=None, FORMAT_GEO_MAP=None, FORMAT_FLOAT_OUT=None, FORMAT_FLOAT_MAP=None, FORMAT_TIME_PRIMARY_MAP=None, FORMAT_TIME_SECONDARY_MAP=None, FORMAT_TIME_STAMP=None, GMT_DATA_SERVER=None, GMT_DATA_SERVER_LIMIT=None, GMT_DATA_UPDATE_INTERVAL=None, GMT_COMPATIBILITY=None, GMT_CUSTOM_LIBS=None, GMT_EXPORT_TYPE=None, GMT_EXTRAPOLATE_VAL=None, GMT_FFT=None, GMT_GRAPHICS_DPU=None, GMT_GRAPHICS_FORMAT=None, GMT_HISTORY=None, GMT_INTERPOLANT=None, GMT_LANGUAGE=None, GMT_MAX_CORES=None, GMT_THEME=None, GMT_TRIANGULATE=None, GMT_VERBOSE=None, IO_COL_SEPARATOR=None, IO_FIRST_HEADER=None, IO_GRIDFILE_FORMAT=None, IO_GRIDFILE_SHORTHAND=None, IO_HEADER=None, IO_HEADER_MARKER=None, IO_N_HEADER_RECS=None, IO_NAN_RECORDS=None, IO_NC4_CHUNK_SIZE=None, IO_NC4_DEFLATION_LEVEL=None, IO_LONLAT_TOGGLE=None, IO_SEGMENT_BINARY=None, IO_SEGMENT_MARKER=None, MAP_ANNOT_MIN_ANGLE=None, MAP_ANNOT_MIN_SPACING=None, MAP_ANNOT_OBLIQUE=None, MAP_ANNOT_OFFSET_PRIMARY=None, MAP_ANNOT_OFFSET_SECONDARY=None, MAP_ANNOT_ORTHO=None, MAP_DEFAULT_PEN=None, MAP_DEGREE_SYMBOL=None, MAP_EMBELLISHMENT_MODE=None, MAP_FRAME_AXES=None, MAP_FRAME_PEN=None, MAP_FRAME_PERCENT=None, MAP_FRAME_TYPE=None, MAP_FRAME_WIDTH=None, MAP_GRID_CROSS_SIZE_PRIMARY=None, MAP_GRID_CROSS_SIZE_SECONDARY=None, MAP_GRID_PEN_PRIMARY=None, MAP_GRID_PEN_SECONDARY=None, MAP_HEADING_OFFSET=None, MAP_LABEL_MODE=None, MAP_LABEL_OFFSET=None, MAP_LINE_STEP=None, MAP_LOGO=None, MAP_LOGO_POS=None, MAP_ORIGIN_X=None, MAP_ORIGIN_Y=None, MAP_POLAR_CAP=None, MAP_SCALE_HEIGHT=None, MAP_TICK_LENGTH_PRIMARY=None, MAP_TICK_LENGTH_SECONDARY=None, MAP_TICK_PEN_PRIMARY=None, MAP_TICK_PEN_SECONDARY=None, MAP_TITLE_OFFSET=None, MAP_VECTOR_SHAPE=None, PROJ_AUX_LATITUDE=None, PROJ_DATUM=None, PROJ_ELLIPSOID=None, PROJ_GEODESIC=None, PROJ_LENGTH_UNIT=None, PROJ_MEAN_RADIUS=None, PROJ_SCALE_FACTOR=None, PS_CHAR_ENCODING=None, PS_COLOR_MODEL=None, PS_COMMENTS=None, PS_CONVERT=None, PS_IMAGE_COMPRESS=None, PS_LINE_CAP=None, PS_LINE_JOIN=None, PS_MITER_LIMIT=None, PS_MEDIA=None, PS_PAGE_COLOR=None, PS_PAGE_ORIENTATION=None, PS_SCALE_X=None, PS_SCALE_Y=None, PS_TRANSPARENCY=None, TIME_EPOCH=None, TIME_IS_INTERVAL=None, TIME_INTERVAL_FRACTION=None, TIME_LEAP_SECONDS=None, TIME_REPORT=None, TIME_UNIT=None, TIME_WEEK_START=None, TIME_Y2K_OFFSET_YEAR=None, FONT=None, FONT_ANNOT=None, FORMAT_TIME_MAP=None, MAP_ANNOT_OFFSET=None, MAP_GRID_CROSS_SIZE=None, MAP_GRID_PEN=None, MAP_TICK_LENGTH=None, MAP_TICK_PEN=None)[source]

Set GMT defaults globally or locally.

Change GMT defaults globally:

pygmt.config(PARAMETER=value)

Change GMT defaults locally by using it as a context manager:

with pygmt.config(PARAMETER=value):
    ...

Full GMT defaults list at https://docs.generic-mapping-tools.org/6.5/gmt.conf.html

Examples using pygmt.config

Line segment caps and joints

Line segment caps and joints

Calculating grid gradient and radiance

Calculating grid gradient and radiance

Calculating grid gradient with custom azimuth and normalize parameters

Calculating grid gradient with custom azimuth and normalize parameters

RGB image

RGB image

Double Y-axes graph

Double Y-axes graph

Scale bar

Scale bar

Configuring PyGMT defaults

Configuring PyGMT defaults

Draping a dataset on top of a topographic surface

Draping a dataset on top of a topographic surface

Performing grid histogram equalization

Performing grid histogram equalization

Plotting datetime charts

Plotting datetime charts

Plotting vectors

Plotting vectors

Polar

Polar