# psxyz¶

psxyz - Plot lines, polygons, and symbols in 3-D

## Synopsis¶

psxyz [ table ] -Jparameters -Jz|Zparameters -Rwest/east/south/north[/zmin/zmax][+r] [ -B[p|s]parameters ] [ -Ddx/dy[/dz] ] [ -Gfill ] [ -Iintens ] [ -K ] [ -L[+b|d|D][+xl|r|x0][+yl|r|y0][+ppen] ] [ -N ] [ -O ] [ -P ] [ -Q ] [ -S[symbol][size[unit]][/size_y] ] [ -T ] [ -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.

## Description¶

psxyz reads (x,y,z) triplets from files [or standard input] and generates PostScript code that will plot lines, polygons, or symbols at those locations in 3-D. If a symbol is selected and no symbol size given, then psxyz 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. If -S is not used, a line connecting the data points will be drawn instead. To explicitly close polygons, use -L. Select a fill with -G. If -G is set, -W will control whether the polygon outline is drawn or not. If a symbol is selected, -G and -W determines the fill and outline/no outline, respectively. The PostScript code is written to standard output.

## Required Arguments¶

-Jparameters (more …)
Select map projection.
-Jz|Zparameters (more …)
Set z-axis scaling; same syntax as -Jx.
-Rxmin/xmax/ymin/ymax[+r][+uunit] (more …)
Specify the region of interest.

For perspective view p, optionally append /zmin/zmax. (more …)

## Optional Arguments¶

table
One or more ASCII (or binary, see -bi[ncols][type]) data table file(s) holding a number of data columns. If no tables are given then we read from standard input.
-B[p|s]parameters (more …)
Set map boundary frame and axes attributes.
-Ccpt
Give a CPT or specify -Ccolor1,color2[,color3,…] to build a linear continuous CPT from those colors automatically. In this case colorn can be a r/g/b triplet, a color name, or an HTML hexadecimal color (e.g. #aabbcc ). If -S is set, let symbol fill color be determined by the t-value in the fourth column. Additional fields are shifted over by one column (optional size would be in 5th rather than 4th field, etc.). If -S is not set, then psxyz expects the user to supply a multisegment file (where each segment header contains a -Zval string. The val will control the color of the line or polygon (if -L is set) via the CPT.
-Ddx/dy[/dz]
Offset the plot symbol or line locations by the given amounts dx/dy[dz] [Default is no offset].
-Gfill
Select color or pattern for filling of symbols or polygons [Default is no fill]. Note that psxyz will search for -G and -W strings in all the segment headers and let any values thus found over-ride the command line settings.
-Iintens
Use the supplied intens value (nominally in the -1 to + 1 range) to modulate the fill color by simulating illumination [none].
-K (more …)
Do not finalize the PostScript plot.
-L[+b|d|D][+xl|r|x0][+yl|r|y0][+ppen]
Force closed polygons. Alternatively, append modifiers to build a polygon from a line segment. Append +d to build symmetrical envelope around y(x) using deviations dy(x) given in extra column 4. Append +D to build asymmetrical envelope around y(x) using deviations dy1(x) and dy2(x) from extra columns 4-5. Append +b to build asymmetrical envelope around y(x) using bounds yl(x) and yh(x) from extra columns 4-5. Append +xl|r|x0 to connect first and last point to anchor points at either xmin, xmax, or x0, or append +yb|t|y0 to connect first and last point to anchor points at either ymin, ymax, or y0. Polygon may be painted (-G) and optionally outlined by adding +ppen [no outline]. All constructed polygons are assumed to have a constant z value.
-N[c|r]
Do NOT clip symbols that fall outside map border [Default plots points whose coordinates are strictly inside the map border only]. The option does not apply to lines and polygons which are always clipped to the map region. For periodic (360-longitude) maps we must plot all symbols twice in case they are clipped by the repeating boundary. The -N will turn off clipping and not plot repeating symbols. Use -Nr to turn off clipping but retain the plotting of such repeating symbols, or use -Nc to retain clipping but turn off plotting of repeating symbols.
-O (more …)
Append to existing PostScript plot.
-P (more …)
Select “Portrait” plot orientation.
-Q
Turn off the automatic sorting of items based on their distance from the viewer. The default is to sort the items so that items in the foreground are plotted after items in the background.
-S[symbol][size[u]][/size_y]

Plot symbols. If present, size is symbol size in the unit set in gmt.conf (unless c, i, or p is appended). If the symbol code (see below) is not given it will be read from the last column in the input data; this cannot be used in conjunction with binary input. Optionally, append c, i, or p to indicate that the size information in the input data is in units of cm, inch, or point, respectively [Default is PROJ_LENGTH_UNIT]. Note: if you give both size and symbol via the input file you must use PROJ_LENGTH_UNIT to indicate the units used for the symbol size or append the units to the size in the file. Some 2-dimensional symbols optionally take a second size via size_y. If symbol sizes are expected via the fourth data column then you may convert those values to suitable symbol sizes via the -i mechanism.

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.

Choose between these symbol codes:

-S-
x-dash (-). size is the length of a short horizontal (x-dir) line segment.
-S+
plus (+). size is diameter of circumscribing circle.
-Sa
star. size is diameter of circumscribing circle.
-Sb
Vertical bar extending from base to y. size is bar width. Append u if size is in x-units [Default is plot-distance units]. By default, base = ymin. Append b[base] to change this value. If base is not appended then we read it from the last input data column.
-SB
Horizontal bar extending from base to x. size is bar width. Append u if size is in y-units [Default is plot-distance units]. By default, base = xmin. Append b[base] to change this value. If base is not appended then we read it from the last input data column.
-Sc
circle. size is diameter of circle.
-Sd
diamond. size is diameter of circumscribing circle.
-Se
ellipse. Direction (in degrees counter-clockwise from horizontal), major_axis, and minor_axis must be found in columns 4, 5, and 6.
-SE
Same as -Se, except azimuth (in degrees east of north) should be given instead of direction. The azimuth will be mapped into an angle based on the chosen map projection (-Se leaves the directions unchanged.) Furthermore, the axes lengths must be given in geographical instead of plot-distance units. An exception occurs for a linear projection in which we assume the ellipse axes are given in the same units as -R. For degenerate ellipses (circles) with just the diameter given, use -SE-. The diameter is excepted to be given in column 4. Alternatively, append the desired diameter to -SE- and this fixed diameter is used instead. For allowable geographical units, see UNITS.
-Sf
front. -Sfgap[/size][+l|+r][+b+c+f+s+t][+ooffset][+p[pen]]. Supply distance gap between symbols and symbol size. If gap is negative, it is interpreted to mean the number of symbols along the front instead. If size is missing it is set to 30% of the gap, except when gap is negative and size is thus required. Append +l or +r to plot symbols on the left or right side of the front [Default is centered]. Append +type to specify which symbol to plot: box, circle, fault, slip, or triangle. [Default is fault]. Slip means left-lateral or right-lateral strike-slip arrows (centered is not an option). The +s modifier optionally accepts the angle used to draw the vector [30]. Append +ooffset to offset the first symbol from the beginning of the front by that amount [0]. The chosen symbol is drawn with the same pen as set for the line (i.e., via -W). The use an alternate pen, append +ppen. To skip the outline, just use +p. Note: By placing -Sf options in the segment header you can change the front types on a segment-by-segment basis.
-Sg
octagon. size is diameter of circumscribing circle.
-Sh
hexagon. size is diameter of circumscribing circle.
-Si
inverted triangle. size is diameter of circumscribing circle.
-Sj
Rotated rectangle. Direction (in degrees counter-clockwise from horizontal), x-dimension, and y-dimension must be found in columns 4, 5, and 6.
-SJ
Same as -Sj, except azimuth (in degrees east of north) should be given instead of direction. The azimuth will be mapped into an angle based on the chosen map projection (-Sj leaves the directions unchanged.) Furthermore, the dimensions must be given in geographical instead of plot-distance units. For a degenerate rectangle (square) with one dimension given, use -SJ-. The dimension is excepted to be given in column 4. Alternatively, append the dimension diameter to -SJ- and this fixed dimension is used instead. An exception occurs for a linear projection in which we assume the dimensions are given in the same units as -R. For allowable geographical units, see UNITS.
-Sk

## Bugs¶

No hidden line removal is employed for polygons and lines. Symbols, however, are first sorted according to their distance from the viewpoint so that nearby symbols will overprint more distant ones should they project to the same x,y position.

psxyz cannot handle filling of polygons that contain the south or north pole. For such a polygon, make a copy and split it into two and make each explicitly contain the polar point. The two polygons will combine to give the desired effect when filled; to draw outline use the original polygon.