pygmt.Figure.grdcontour¶
-
Figure.
grdcontour
(grid, **kwargs)¶ Convert grids or images to contours and plot them on maps
Takes a grid file name or an xarray.DataArray object as input.
Full option list at https://docs.generic-mapping-tools.org/latest/grdcontour.html
Aliases:
A = annotation
B = frame
C = interval
G = label_placement
J = projection
L = limit
Q = cut
R = region
S = resample
U = timestamp
W = pen
- Parameters
grid (str or xarray.DataArray) – The file name of the input grid or the grid loaded as a DataArray.
Specify the contour lines to generate.
The filename of a CPT file where the color boundaries will be used as contour levels.
The filename of a 2 (or 3) column file containing the contour levels (col 1), (C)ontour or (A)nnotate (col 2), and optional angle (col 3)
A fixed contour interval
cont_int
or a single contour with+[cont_int]
annotation (str, int, or list) –
Specify or disable annotated contour levels, modifies annotated contours specified in
-C
.Specify a fixed annotation interval
annot_int
or a single annotation level+[annot_int]
Disable all annotation with
'-'
Optional label modifiers can be specified as a single string
'[annot_int]+e'
or with a list of options([annot_int], 'e', 'f10p', 'gred')
.
limit (str or list of 2 ints) – Do no draw contours below low or above high, specify as string
'[low]/[high]'
or list[low,high]
.cut (string or int) – Do not draw contours with less than cut number of points.
resample (string or int) – Resample smoothing factor.
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.frame (str or list) – Set map boundary frame and axes attributes.
color (str) – Select color or pattern for filling of symbols or polygons. Default is no fill.
pen (str) – Set pen attributes for lines or the outline of symbols.