pygmt.Figure.ternary
- Figure.ternary(data, alabel=None, blabel=None, clabel=None, **kwargs)
Plot ternary diagrams.
Reads (a,b,c[,z]) records from data and plots symbols at those locations on a ternary diagram. If a symbol is selected and no symbol size given, then we will interpret the fourth column of the input data as symbol size. Symbols whose size is <= 0 are skipped. If no symbols are specified then the symbol code (see
style
below) must be present as last column in the input. Ifstyle
is not specified then we instead plot lines or polygons.Full option list at https://docs.generic-mapping-tools.org/6.5/ternary.html
Aliases:
B = frame
C = cmap
G = fill
JX = width
R = region
S = style
V = verbose
W = pen
c = panel
p = perspective
t = transparency
- Parameters:
data (str, list, numpy.ndarray, pandas.DataFrame, xarray.Dataset, or geopandas.GeoDataFrame) – Pass in either a file name to an ASCII data table, a Python list, a 2-D
numpy.ndarray
, apandas.DataFrame
, anxarray.Dataset
made up of 1-Dxarray.DataArray
data variables, or ageopandas.GeoDataFrame
containing the tabular data.width (str) – Set the width of the figure by passing a number, followed by a unit (i for inches, c for centimeters). Use a negative width to indicate that positive axes directions be clock-wise [Default lets the a, b, c axes be positive in a counter-clockwise direction].
region (str or list) – [amin, amax, bmin, bmax, cmin, cmax]. Give the min and max limits for each of the three axes a, b, and c.
cmap (str) – File name of a CPT file or a series of comma-separated colors (e.g., color1,color2,color3) to build a linear continuous CPT from those colors automatically.
fill (str) – Set color or pattern for filling symbols or polygons [Default is no fill].
alabel (
str
|None
, default:None
) – Set the label for the a vertex where the component is 100%. The label is placed at a distance of three times the MAP_LABEL_OFFSET setting from the corner.blabel (
str
|None
, default:None
) – Same asalabel
but for the b vertex.clabel (
str
|None
, default:None
) – Same asalabel
but for the c vertex.style (str) – symbol[size]. Plot individual symbols in a ternary diagram.
pen (str) – Set pen attributes for lines or the outline of symbols.
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 algorithms)
i - Informational messages (same as
verbose=True
)c - Compatibility warnings
d - Debugging messages
panel (bool, int, or list) – [row,col|index]. Select a specific subplot panel. Only allowed when in subplot mode. Use
panel=True
to advance to the next panel in the selected order. Instead of row,col you may also give a scalar value index which depends on the order you set viaautolabel
when the subplot was defined. Note: row, col, and index all start at 0.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/6.5/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).