PSTERNARY(1gmt) | GMT | PSTERNARY(1gmt) |
psternary - Plot data on ternary diagrams
psternary [ table ] [ -JX *width*[unit] ] [ -Rwest/east/south/north[/zmin/zmax][+r] ] [ -B[p|s]parameters ] [ -Ccpt ] [ -Gfill ] [ -K ] [ -La/b/c ] [ -M ] [ -N ] [ -O ] [ -P ] [ -S[symbol][size[u] ] [ -U[stamp] ] [ -V[level] ] [ -W[pen][attr] ] [ -Xx_offset ] [ -Yy_offset ] [ -aflags ] [ -bibinary ] [ -dinodata ] [ -eregexp ] [ -fflags ] [ -ggaps ] [ -hheaders ] [ -iflags ] [ -pflags ] [ -ttransp ] [ -:[i|o] ]
Note: No space is allowed between the option flag and the associated arguments.
psternary reads (a,b,c[,*z*]) records from files [or standard input] and generates PostScript code that will plot symbols at those locations on a ternary diagram. If a symbol is selected and no symbol size given, then psternary 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 -S below) must be present as last column in the input. The PostScript code is written to standard output.
The uppercase symbols A, C, D, G, H, I, N, S, T are normalized to have the same area as a circle with diameter size, while the size of the corresponding lowercase symbols refers to the diameter of a circumscribed circle.
You can change symbols by adding the required -S option to any of your multisegment headers.
Choose between these symbol codes:
The optional labelinfo controls the specifics of the label formatting and consists of a concatenated string made up of any of the following control arguments:
+Lh Take the label from the current segment header (first scan for an embedded -Llabel option, if not use the first word following the segment flag). For multiple-word labels, enclose entire label in double quotes. +Ld Take the Cartesian plot distances along the line as the label; append c|i|p as the unit [Default is PROJ_LENGTH_UNIT]. +LD Calculate actual map distances; append d|e|f|k|n|M|n|s as the unit [Default is d(egrees), unless label placement was based on map distances along the lines in which case we use the same unit specified for that algorithm]. Requires a map projection to be used. +Lf Use text after the 2nd column in the fixed label location file as the label. Requires the fixed label location setting. +Lx As +Lh but use the headers in the xfile.d instead. Requires the crossing file option.
Note: By placing -Sq options in the segment header you can change the quoted text attributes on a segment-by-segment basis.
The optional symbolinfo controls the specifics of the symbol selection and formatting and consists of a concatenated string made up of any of the following control arguments:
Note: By placing -S~ options in the segment header you can change the decorated lines on a segment-by-segment basis.
-X[a|c|f|r][x-shift[u]]
For map distance unit, append unit d for arc degree, m for arc minute, and s for arc second, or e for meter [Default], f for foot, k for km, M for statute mile, n for nautical mile, and u for US survey foot. By default we compute such distances using a spherical approximation with great circles. Prepend - to a distance (or the unit is no distance is given) to perform "Flat Earth" calculations (quicker but less accurate) or prepend + to perform exact geodesic calculations (slower but more accurate).
Several modifiers may be appended to the vector-producing options to specify the placement of vector heads, their shapes, and the justification of the vector. Below, left and right refers to the side of the vector line when viewed from the start point to the end point of the segment:
+b places a vector head at the beginning of the vector path [none]. Optionally, append t for a terminal line, c for a circle, a for arrow [Default], i for tail, A for plain arrow, and I for plain tail. Further append l|r to only draw the left or right side of this head [both sides].
+e places a vector head at the end of the vector path [none]. Optionally, append t for a terminal line, c for a circle, a for arrow [Default], i for tail, A for plain arrow, and I for plain tail. Further append l|r to only draw the left or right side of this head [both sides].
+g-|fill turns off vector head fill (if -) or sets the vector head fill [Default fill is used, which may be no fill].
+hshape sets the shape of the vector head (range -2/2). Default is controlled by MAP_VECTOR_SHAPE [0].
+l draws half-arrows, using only the left side of specified heads [both sides].
+m places a vector head at the mid-point the vector path [none]. Append f or r for forward or reverse direction of the vector [forward]. Optionally, append t for a terminal line, c for a circle, or a for arrow head [Default]. Further append l|r to only draw the left or right side of this head [both sides]. Cannot be combined with +b or +e.
+nnorm scales down vector attributes (pen thickness, head size) with decreasing length, where vectors shorter than norm will have their attributes scaled by length/norm [arrow attributes remains invariant to length].
+oplon/plat specifies the oblique pole for the great or small circles. Only needed for great circles if +q is given.
+p[-][pen] sets the vector pen attributes. If pen has a leading - then the head outline is not drawn. [Default pen is used, and head outline is drawn]
+q means the input angle, length data instead represent the start and stop opening angles of the arc segment relative to the given point.
+r draws half-arrows, using only the right side of specified heads [both sides].
+t[b|e]trim will shift the beginning or end point (or both) along the vector segment by the given trim; append suitable unit. If the modifiers b|e are not used then trim may be two values separated by a slash, which is used to specify different trims for the two ends. Positive trims will shorted the vector while negative trims will lengthen it [no trim].
In addition, all but circular vectors may take these modifiers:
+s means the input angle, length are instead the x, y coordinates of the vector end point.
Finally, Cartesian vectors may take these modifiers:
To plot circles (diameter = 0.1 cm) on a 6-inch-wide ternary diagram at the positions listed in the file ternary.txt, with default annotations and gridline spacings, using the specified labeling, tru
gmt psternary ternary.txt -R0/100/0/100/0/100 -JX6i -P -Xc -Baafg+l"Water component"+u" %" \ -Bbafg+l"Air component"+u" %" -Bcagf+l"Limestone component"+u" %" \ -B+givory+t"Example data from MATLAB Central" -Sc0.1c -Ct.cpt -Y2i -LWater/Air/Limestone > map.ps
gmt, gmt.conf, gmtcolors, psbasemap, psxy, psxyz
2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
May 21, 2019 | 5.4.5 |