pygmt.Figure.show

Figure.show(dpi=300, width=500)[source]

Display a preview of the figure.

Inserts the preview in the Jupyter notebook output, otherwise opens it in the default viewer for your operating system (falls back to the default web browser). Note that the external viewer does not block the current process, so this won’t work in a script.

Parameters
  • dpi (int) – The image resolution (dots per inch).

  • width (int) – Width of the figure shown in the notebook in pixels.

Returns

img (IPython.display.Image) – Only if in Jupyter notebook.