pygmt.Figure.image

Figure.image(imagefile, **kwargs)

Place images or EPS files on maps.

Reads an Encapsulated PostScript file or a raster image file and plots it on a map.

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

Aliases:

  • D = position

  • F = box

  • J = projection

  • M = monochrome

  • R = region

Parameters
  • imagefile (str) – This must be an Encapsulated PostScript (EPS) file or a raster image. An EPS file must contain an appropriate BoundingBox. A raster file can have a depth of 1, 8, 24, or 32 bits and is read via GDAL. Note: If GDAL was not configured during GMT installation then only EPS files are supported.

  • projection (str) – Required if this is the first plot command. Select map projection.

  • region (str or list) – Required if this is the first plot command. 'xmin/xmax/ymin/ymax[+r][+uunit]'. Specify the region of interest.

  • position (str) – '[g|j|J|n|x]refpoint+rdpi+w[-]width[/height][+jjustify] [+nnx[/ny]][+odx[/dy]]' Sets reference point on the map for the image.

  • box (bool or str) – '[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]] [+s[[dx/dy/][shade]]]' Without further options, draws a rectangular border around the image using MAP_FRAME_PEN.

  • monochrome (bool) – Convert color image to monochrome grayshades using the (television) YIQ-transformation.