pygmt.Figure.coast¶
-
Figure.
coast
(**kwargs)¶ Plot continents, shorelines, rivers, and borders on maps
Plots grayshaded, colored, or textured land-masses [or water-masses] on maps and [optionally] draws coastlines, rivers, and political boundaries. Alternatively, it can (1) issue clip paths that will contain all land or all water areas, or (2) dump the data to an ASCII table. The data files come in 5 different resolutions: (f)ull, (h)igh, (i)ntermediate, (l)ow, and (c)rude. The full resolution files amount to more than 55 Mb of data and provide great detail; for maps of larger geographical extent it is more economical to use one of the other resolutions. If the user selects to paint the land-areas and does not specify fill of water-areas then the latter will be transparent (i.e., earlier graphics drawn in those areas will not be overwritten). Likewise, if the water-areas are painted and no land fill is set then the land-areas will be transparent.
A map projection must be supplied.
Full option list at https://docs.generic-mapping-tools.org/latest/coast.html
Aliases:
A = area_thresh
B = frame
D = resolution
E = paint_country
G = land
I = rivers
J = projection
L = map_scale
N = borders
R = region
S = water
U = timestamp
V = verbose
W = shorelines
X = xshift
Y = yshift
p = perspective
t = transparency
- Parameters
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.area_thresh (int, float, or str) –
'min_area[/min_level/max_level][+ag|i|s|S][+r|l][+ppercent]'
Features with an area smaller than min_area in km^2 or of hierarchical level that is lower than min_level or higher than max_level will not be plotted.frame (str or list) – Set map boundary frame and axes attributes.
C (str) – Set the shade, color, or pattern for lakes and river-lakes.
resolution (str) – Selects the resolution of the data set to use ((f)ull, (h)igh, (i)ntermediate, (l)ow, and (c)rude).
land (str) – Select filling or clipping of “dry” areas.
rivers (str) –
'river[/pen]'
Draw rivers. Specify the type of rivers and [optionally] append pen attributes.map_scale (str) –
'[g|j|J|n|x]refpoint'
Draws a simple map scale centered on the reference point specified.borders (str) –
'border[/pen]'
Draw political boundaries. Specify the type of boundary and [optionally] append pen attributeswater (str) – Select filling or clipping of “wet” areas.
verbose (str) –
Select verbosity level [Default is w], which modulates the messages written to stderr. Choose among 7 levels of verbosity:
q - Quiet, not even fatal error messages are produced
e - Error messages only
w - Warnings [Default]
t - Timings (report runtimes for time-intensive algorthms);
i - Informational messages (same as “verbose=True”)
c - Compatibility warnings
d - Debugging messages
shorelines (str) –
'[level/]pen'
Draw shorelines [Default is no shorelines]. Append pen attributes.paint_country (str or list) –
code1,code2,…[+l|L][+gfill][+ppen][+z]
Select painting or dumping country polygons from the Digital Chart of the World. Append one or more comma-separated countries using the 2-character ISO 3166-1 alpha-2 convention. To select a state of a country (if available), append .state, (e.g, US.TX for Texas). To specify a whole continent, prepend = to any of the continent codes (e.g. =EU for Europe). Append +p**pen to draw polygon outlines (default is no outline) and **+g**fill to fill them (default is no fill). Append **+l**|**+L to =continent to only list countries in that continent; repeat if more than one continent is requested. Append +z to place the country code in the segment headers via -Zcode settings.To apply different settings to different countries, pass a list of string arguments.xshift (str) –
[a|c|f|r][xshift]
. Shift plot origin in x-direction.yshift (str) –
[a|c|f|r][yshift]
. Shift plot origin in y-direction. Full documentation is at https://docs.generic-mapping-tools.org/latest/gmt.html#xy-full.perspective (list or str) –
'[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]'
. Select perspective view and set the azimuth and elevation angle of the viewpoint. Default is [180, 90]. Full documentation is at https://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full.transparency (float) – Set transparency level, in [0-100] percent range. Default is 0, i.e., opaque. Only visible when PDF or raster format output is selected. Only the PNG format selection adds a transparency layer in the image (for further processing).