psxy¶

Plot lines, polygons, and symbols in ii-D

Synopsis¶

gmt psxy [ table ] -J parameters -R westward/east/south/north[/zmin/zmax][+r][+u unit] [ -A [m|p|x|y|r|t] ] [ -B [p|s]parameters ] [ -C cpt ] [ -D dx/dy ] [ -Eastward [ten|y|X|Y][+a|A][+cl|f][+north][+w cap][+p pen] ] [ -F [c|n|r][a|f|s|r|refpoint] ] [ -G fill ] [ -H [scale] ] [ -I [intens] ] [ -M ] [ -L [+b|d|D][+xl|r|x0][+yl|r|y0][+p pen] ] [ -North [c|r] ] [ -O ] [ -P ] [ -Due south [symbol][size] ] [ -T ] [ -U [postage] ] [ -V [level] ] [ -W [pen][attr] ] [ -Ten [a|c|f|r][xshift] ] [ -Y [a|c|f|r][yshift] ] [ -Z value [+f|fifty] ] [ -a flags ] [ -bi binary ] [ -di nodata[+c col] ] [ -e regexp ] [ -f flags ] [ -thou gaps ] [ -h headers ] [ -i flags ] [ -p flags ] [ -qi flags ] [ -t transp ] [ -w flags ] [ -:[i|o] ] [ --PAR=value ]

Description¶

Reads (x,y) pairs from files [or standard input] and will plot lines, polygons, or symbols at those locations on a map. If a symbol is selected and no symbol size given, and so it will translate the tertiary 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 exist present every bit concluding column in the input. If -S is non used, a line connecting the information points will exist drawn instead. To explicitly close polygons, utilize -Fifty. Select a fill with -G. If -G is set, -W volition control whether the polygon outline is drawn or not. If a symbol is selected, -1000 and -W determines the make full and outline/no outline, respectively.

Required Arguments¶

table

One or more than 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.

-J parameters

Specify the projection. (See full clarification) (Encounter cookbook summary) (See projections table).

-R xmin/xmax/ymin/ymax[+r][+u unit of measurement]

Specify the region of interest. Note: If using modern fashion and -R is non provided, the region will be set based on previous plotting commands. If this is the kickoff plotting command in the modernistic mode levels and -R is not provided, the region will be automatically adamant based on the data in table (equivalent to using -Ra). (See full description) (Meet cookbook information).

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

Optional Arguments¶

-A[m|p|x|y|r|t]

By default, geographic line segments are drawn equally corking circle arcs by resampling coarse input information along such arcs. To disable this sampling and describe them as direct lines, use the -A flag. Alternatively, add grand to draw the line by first post-obit a pinnacle, and so a parallel. Or append p to start following a parallel, then a meridian. (This can exist practical to draw a line along parallels, for case). For Cartesian data, points are but connected, unless you suspend ten or y to draw stair-case curves that whose first motility is forth x or y, respectively. For polar projection, append r or t to depict stair-example curves that whose first movement is forth r or theta, respectively.

-B[p|s]parameters

Set map purlieus frame and axes attributes. (Run into full description) (See cookbook information).

-C cpt

Give a CPT or specify -C color1,color2[,color3,…] to build a linear continuous CPT from those colors automatically, where z starts at 0 and is incremented by one for each color. In this case color n can exist a r/1000/b triplet, a color proper name, or an HTML hexadecimal color (e.thousand. #aabbcc ). If -S is set, allow symbol fill up color be adamant by the z-value in the third column. Additional fields are shifted over by ane cavalcade (optional size would exist 4th rather than tertiary field, etc.). If -S is not gear up, and then it expects the user to supply a multisegment file where each segment header contains a -Z value cord. The value volition control the colour of the line or polygon (if -L is gear up) via the CPT. Alternatively, see the -Z option for how to assign z-values. Note: If modern mode and no argument is given then nosotros select the electric current CPT.

-D dx/dy

Start the plot symbol or line locations by the given amounts dx/dy [Default is no offset]. If dy is not given it is prepare equal to dx. You lot may suspend dimensional units from c|i|p to each value.

-Due east[x|y|Ten|Y][+a|A][+cl|f][+north][+west cap][+p pen]

Draw symmetrical error bars. Suspend x and/or y to indicate which bars you desire to draw (Default is both x and y). The 10 and/or y errors must be stored in the columns after the (x,y) pair [or (x,y,z) triplet]. If +a is appended and then we will depict asymmetrical mistake bars; these requires two rather than ane extra data cavalcade, with the 2 signed deviations. Employ +A to read the low and high bounds rather than signed deviations. If upper example X and/or Y are used nosotros will instead draw "box-and-whisker" (or "stem-and-leaf") symbols. The x (or y) coordinate is so taken every bit the median value, and iv more columns are expected to contain the minimum (0% quantile), the 25% quantile, the 75% quantile, and the maximum (100% quantile) values. The 25-75% box may be filled by using -G. If +due north is appended the we draw a notched "box-and-whisker" symbol where the notch width reflects the doubt in the median. This symbol requires a 5th extra data column to contain the number of points in the distribution. The +westward modifier sets the cap width that indicates the length of the end-cap on the error bars [7p]. Pen attributes for error bars may as well be set via +p pen. [Defaults: width = default, color = black, style = solid]. When -C is used we can command how the look-up color is practical to our symbol. Suspend +cf to use it to fill the symbol, while +cl will only set the fault pen colour and turn off symbol make full. Giving +c will set both colour items. Note: The error bars are placed backside symbols except for the large vertical and horizontal bar symbols (-Sb|B) where they are plotted on top to avoid the lower bounds being obscured.

-F[c|n|p][a|f|s|r|refpoint]

Alter the manner points are continued (by specifying a scheme) and data are grouped (by specifying a method). Append one of iii line connection schemes: c: Draw continuous line segments for each group [Default]. p: Draw line segments from a reference indicate reset for each grouping. n: Draw networks of line segments between all points in each group. Optionally, append the one of 4 sectionalisation methods to ascertain the group: a: Ignore all segment headers, i.e., let all points belong to a unmarried group, and set group reference point to the very get-go signal of the beginning file. f: Consider all information in each file to be a single separate group and reset the group reference point to the showtime bespeak of each group. s: Segment headers are honored so each segment is a grouping; the grouping reference betoken is reset to the outset point of each incoming segment [Default]. r: Aforementioned as s, simply the group reference bespeak is reset after each record to the previous point (this method is merely available with the -Fp scheme). Instead of the codes a|f|southward|r y'all may append the coordinates of a refpoint which will serve as a fixed external reference point for all groups.

-G fill|+z (more …)

Select color or blueprint for filling of symbols or polygons [Default is no fill up]. Note that this module volition search for -G and -W strings in all the segment headers and permit any values thus institute over-ride the command line settings. If -Z is ready, utilise -Thousand+z to assign make full colour via -C cpt and the z-values obtained. Finally, if fill = auto[-segment] or motorcar-tabular array and then nosotros volition cycle through the fill up colors implied by COLOR_SET and modify on a per-segment or per-table basis. Any transparency setting is unchanged.

-H[scale]

Scale symbol sizes and pen widths on a per-record basis using the scale read from the data gear up, given as the start column after the (optional) z and size columns [no scaling]. The symbol size is either provided by -S or via the input size cavalcade. Alternatively, append a constant calibration that should exist used instead of reading a scale cavalcade.

-I intens

Use the supplied intens value (nominally in the -ane to +1 range) to modulate the fill color by simulating illumination [none]. If no intensity is provided we volition instead read intens from the first data column after the symbol parameters (if given).

-Fifty[+b|d|D][+xl|r|x0][+yb|t|y0][+p pen] Instance

X

-L example

ps=filler.ps
cat << EOF > t.txt
1 1
2 iii
iii 2
4 4
EOF
gmt psxy -R0/5/0/5 -JX3i -P -Yard -B0 t.txt -Gred -W2p -L+yb > $ps
gmt psxy -R -J -O -Chiliad -B0 t.txt -Gred -W2p -L+yt -X3.25i >> $ps
gmt psxy -R -J -O -K -B0 t.txt -Gred -W2p -50+xl -X-3.25i -Y3.25i >> $ps
gmt psxy -R -J -O -K -B0 t.txt -Gred -W2p -L+xr -X3.25i >> $ps
gmt psxy -R -J -O -1000 -B0 t.txt -Gred -W2p -L+y4 -X-3.25i -Y3.25i >> $ps
gmt psxy -R -J -O -G -B0 t.txt -Gred -W2p -Fifty+x4.5 -X3.25i >> $ps
gmt psxy -R -J -O -T >> $ps

Strength closed polygons. Alternatively, suspend modifiers to build a polygon from a line segment. Suspend +d to build symmetrical envelope around y(10) using deviations dy(x) given in actress cavalcade iii. Append +D to build asymmetrical envelope effectually y(x) using deviations dy1(x) and dy2(ten) from extra columns 3-iv. Append +b to build asymmetrical envelope effectually y(10) using premises yl(x) and yh(ten) from extra columns three-4. Suspend +xl|r|x0 to connect first and last indicate to ballast points at either xmin, xmax, or x0, or suspend +yb|t|y0 to connect offset and last point to anchor points at either ymin, ymax, or y0. Polygon may exist painted (-Yard) and optionally outlined by calculation +p pen [no outline]. Annotation: When option -Z is passed via segment headers you will demand -L to ensure your segments are interpreted as polygons, else they are seen equally lines.

-Due north[c|r]

Do NOT clip symbols that fall outside map border [Default plots points whose coordinates are strictly inside the map border merely]. The option does not utilise 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 purlieus. The -N volition 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 just turn off plotting of repeating symbols.

-S[symbol][size]

Plot symbols (including vectors, wedges, fronts, busy or quoted lines). If present, size is symbol size in the default unit set by PROJ_LENGTH_UNIT (unless c, i, or p is appended). If the symbol code (see beneath) is not given it volition exist read from the last column in the input data; this scheme cannot be used in conjunction with binary input. Optionally, append c, i, or p to indicate that the size information in the input information is in units of cm, inch, or point, respectively [Default is PROJ_LENGTH_UNIT]. Notation: If you provide both size and symbol via the input file you must use PROJ_LENGTH_UNIT to indicate the unit used for the symbol size or suspend the units to the sizes listed in the file. If symbol sizes are expected via one or more information columns then you may catechumen those values to suitable symbol sizes via the -i mechanism. The full general input expectations are:

coordinates [ value ] [ parameters ] [ symbol ]

where coordinates is two or three columns specifying the location of a point, the optional value is required when -C is used to control colour, the optional parameters is required when no symbol size is specified, and the trailing text with leading symbol code is required when the symbol lawmaking is non specified on the command line. Note: parameters may represent more than ane size column as some symbols require several parameters to exist divers (e.g., a circle just needs 1 cavalcade, a rectangle needs two dimensions, while an ellipse needs an orientation and ii dimensions, and and then on); run across specifics beneath. When there is only a single parameter we will refer to it as size.

You lot can as well change symbols by calculation the required -S pick to any of your multi-segment headers.

We will start outline the 14 basic geometric symbols that simply crave a unmarried parameter: size.

_images/GMT_base_symbols1.png

The 14 basic geometric symbols available, shown with their symbol codes. 4 symbols (-|+|ten|y) are line-symbols but (-West), 1 (the bespeak p only takes a color via -Yard) while the rest may have outline (-W) and fill up (-G) specified. The thin circles represent the circumscribing circle of the same size.

-S- size

x-dash (-). size is the length of a short horizontal (x-dir) line segment.

-S+ size

Plus (+). size is bore of circumscribing circle.

-Sa size

Star. size is diameter of circumscribing circle.

-Sc size

circle. size is diameter of circumvolve.

-Sd size

diamond. size is diameter of circumscribing circumvolve.

-Sg size

Octagon. size is diameter of circumscribing circumvolve.

-Sh size

hexagon. size is bore of circumscribing circumvolve.

-Si size

inverted triangle. size is diameter of circumscribing circle.

-Sn size

Pentagon. size is diameter of circumscribing circle.

-Sp size

point. No size needs to be specified (1 pixel is used).

-Ss size

due southquare. size is diameter of circumscribing circle.

-St size

triangle. size is diameter of circumscribing circle.

-Sx size

Cross (x). size is diameter of circumscribing circle.

-Sy size

y-nuance (|). size is the length of a short vertical (y-dir) line segment.

Note: The upper-case letter symbols A, C, D, G, H, I, N, S, T are normalized to have the same surface area as a circle with diameter size, while the size of the corresponding lowercase symbols refers to the diameter of a confining circumvolve.

The adjacent collection shows 5 symbols that require ii or more parameters, and some accept optional modifiers to enhance the symbol advent.

_images/GMT_base_symbols2.png

Five basic geometric multi-parameter symbols, shown with their symbol codes. All take 2 or three parameters to define the symbol; meet below for details. Upper-instance versions E, J, and W are similar to e, j and w but expect geographic azimuths and distances.

-Se direction/major_axis/minor_axis

eastwardllipse. If not given, then direction (in degrees counter-clockwise from horizontal), major_axis, and minor_axis must exist institute after the coordinates [and value] columns. This choice yields a Cartesian ellipse whose shape is unaffected by the map project. If merely a single size is given so nosotros plot a degenerate ellipse (circle) with given diameter.

-SE azimuth/major_axis/minor_axis

Same as -Se, except azimuth (in degrees east of n) should be given instead of direction. The azimuth will exist mapped into an angle based on the chosen map projection (-Se leaves the directions unchanged.) Furthermore, major_axis and minor_axis must be given in geographical instead of plot-distance units. For degenerate ellipses (i.eastward., circles) with simply a diameter given via the input data, apply -SE-. For a linear projection nosotros presume the dimensions are given in the aforementioned units as -R. For allowable geographical units, come across Units and append desired unit to the dimension(s); if dimensions are read from the input then either just append the unit for these values or suspend the unit to each dimension in the file (practise not do both) [Default is k for km]. The shape of the ellipse will exist afflicted by the properties of the map projection.

-Sj management/width/height

Rotated rectangle. If not given, and so direction (in degrees counter-clockwise from horizontal), width, and height must be establish after the location [and value] columns. If but a unmarried size is given and so we plot a degenerate rectangle (square) with given size.

-SJ azimuth/width/peak

Same equally -Sj, except azimuth (in degrees east of n) should be given instead of direction. The azimuth will be mapped into an bending based on the chosen map projection (-Sj leaves the directions unchanged.) Furthermore, the two dimensions must exist given in geographical instead of plot-distance units. For a degenerate rectangle (i.east., foursquare) with one dimension expected to exist given via the input information, utilise -SJ-. For a linear projection we presume the dimensions are given in the aforementioned units equally -R. For allowable geographical units, run into Units and append desired unit of measurement to the dimension(south); if dimensions are read from the input then either only append the unit of measurement for these values or suspend the unit of measurement to each dimension in the file (practise non exercise both) [Default is chiliad for km]. The shape of the rectangle volition be afflicted by the backdrop of the map project.

-Sr width/height

rectangle. If width/height are not given, then these dimensions must be found later on the location [and value] columns. Alternatively, append +due south and so the diagonal corner coordinates are expected after the location [and value] columns instead.

-SR width/height/radius

Rounded rectangle. If width/peak/radius are not given, and then the two dimensions and corner radius must be constitute subsequently the location [and value] columns.

-Sw[outer[/startdir/stopdir]][+i[inner]]

Pie wedge. Give the outer diameter outer, startdir and stopdir. These are directions (in degrees counter-clockwise from horizontal) for wedge. Parameters non appended are read from file afterwards the location [and value] columns. Append +i and append a nonzero inner diameter inner or it will be read final [0]. Append +a[dr] to describe the arc line (at inner and outer diameter); if dr is appended and so nosotros depict all arc lines separated radially by dr. Append +r[da] to depict radial lines (at start and stop directions) if da is appended so we depict all radial lines separated angularly by da. These spider-web lines are fatigued using the electric current pen unless +p pen is added.

-SW[outer[/startaz/stopaz]][+i[inner]]

Same as -Sw, except azimuths (in degrees east of north) should be given instead of the two directions. The azimuths will be mapped into angles based on the chosen map projection (-Sw leaves the directions unchanged). The 2 diameters are expected in geographic units. For allowable geographical units, come across Units and append desired unit to the dimension(due south); if dimensions are read from the input and then either only append the unit for these values or append the unit to each dimension in the file (exercise not exercise both) [Default is one thousand for km]. However, if specified on the command line we besides accept plot dimension units. Append +i and suspend a nonzero inner diameter inner or it will exist read terminal [0]. Append +a[dr] to draw the arc line (at inner and outer diameter); if dr is appended then we draw all arc lines separated radially by dr. Append +r[da] to depict radial lines (at start and finish directions) if da is appended then nosotros describe all radial lines separated angularly by da. These spider-web lines are drawn using the current pen unless +p pen is added.

Text is normally placed with text but there are times nosotros wish to treat a graphic symbol of even a string every bit a symbol to be plotted:

_images/GMT_base_symbols3.png

A text symbol tin can exist whatsoever letter or string (upwards to 256 characters) and you may specify specific fonts (size and type) and control outline and the fill properties. Note at that place is no mechanism to perfectly centre the string; see -D to make a elementary global adjustment.

-Sl size +t string[+a|A angle][+f font][+j justify]

50etter or text string (less than 256 characters). Give size, and append +t string subsequently the size. Notation: The size is but approximate; no private scaling is done for different characters. Remember to escape special characters like *. Optionally, you may append +a to change the angle with the horiontal [0] or use +A to indicate map azimuth instead, +f font to select a item font [Default is FONT_ANNOT_PRIMARY] and +j justify to modify justification [CM].

The next type of symbol is the horizontal or vertical bar:

_images/GMT_base_symbols4.png

We may place vertical (b) or horizontal (B) bars, and they may extend from the base of your choosing. The thickness of a bar can exist a given dimension or can exist specified in the units of that axis so its width scales with the projection and region. Using modifiers +5 or +i you can too plot multi-ring bars with colors set via -C, and +south tin represent those as groups of private bars instead.

-Sb[size[c|i|p|q]][+b|B[base of operations]][+v|i ny][+s[gap]]

Vertical bar extending from base of operations to y. The size is bar width. Append q if size is a quantity in x-units [Default is plot-distance units]. By default, base = 0. Suspend +b[base] to modify this value. If base is not appended then we read it from the last input data column. Utilise +B[base] if the bar acme is measured relative to base [Relative to origin]. Normally, the bar requires a single input y-value. To plot multi-band confined, delight append +v|i ny, where ny indicates the total number of bands in the bar. Here, +i means we must accumulate the bar values from the increments dy, while +v means we get the complete values relative to base of operations. Normally, the bands are plotted as sections of a concluding single bar. Use +s to instead split the bar into ny side-by-side, individual and thinner bars. The optional gap is a percentage (of fraction) of size for calculation gaps between the bars [none], where size is the combined width of all the individual, thinner confined plus the gaps. Multiband bars requires -C with one color per ring (CPT z-values must be 0, 1, …, ny - 1). Thus, input records are either (ten y1 y2 … yn) or (x dy1 dy2 … dyn).

-SB[size[c|i|p|q]][+b|B[base]][+five|i nx][+s[gap]]

Horizontal bar extending from base to x. The size is bar width. Append q if size is a quantity in y-units [Default is plot-distance units]. Past default, base = 0. Suspend +b[base] to modify this value. If base of operations is non appended then we read it from the terminal input data column. Use +B[base] if the bar length is measured relative to base [Relative to origin]. Normally, the bar requires a single input ten-value. To plot multi-band bars, delight append +five|i nx, where nx indicates the full number of bands in the bar. Here, +i means nosotros must accumulate the bar value from the increments dx, while +v means we get the consummate values relative to base. Normally, the bands are plotted every bit sections of a final single bar. Utilise +s to instead split the bar into nx side-by-side, individual and thinner confined. The optional gap is a percentage (of fraction) of size for adding gaps between the bars [none], where size is the combined width of all the private, thinner bars plus the gaps. Multiband bars requires -C with one color per band (CPT z-values must be 0, one, …, nx - 1). Thus, input records are either (x1 y x2 … xn) or (dx1 y dx2 … dxn).

The side by side family of symbols are all different types of vectors. Apart from requiring parameters such every bit length and direction (or optionally the coordinates of the finish point), we also offer a rich set up of modifiers to customize the vector caput(s).

_images/GMT_base_symbols5.png

There are three classes of vectors: Cartesian (left), circular (centre) and geographic (correct). While their use is slightly different, they all share mutual modifiers that affect how they are displayed.

-Sm size[+ vecmodifiers]

thousandath angle arc, optionally with 1 or two arrow heads [Default is no arrow heads]. The size is the length of the vector head. Arc width is set by -W, with vector head outlines defaulting to one-half of arc width. The radius of the arc and its start and cease directions (in degrees counter-clockwise from horizontal) must be given subsequently the location [and value] columns. See Vector Attributes for specifying other attributes.

-SM size[+ vecmodifiers]

Same as -Sm only switches to straight bending symbol if start and stop angles subtend ninety degrees exactly.

-Sv size[+ vecmodifiers]

vector. The direction (in degrees counter-clockwise from horizontal) and length must be found after the location [and value] columns, and size, if not specified on the control-line, should be present as well, pushing the other items to afterwards columns. The size is the length of the vector head. Vector stem width is set by -West, with caput outline pen width defaulting to half of stem pen width. See Vector Attributes for specifying this and other attributes.

-SV size[+ vecmodifiers]

Same as -Sv, except azimuth (in degrees due east of n) should be given instead of direction. The azimuth volition be mapped into an angle based on the chosen map project (-Sv leaves the directions unchanged.) If your length is not in plot units but in arbitrary user units (east.k., a rate in mm/twelvemonth) then yous can employ the -i choice to scale the corresponding cavalcade via the +s scale modifier. Encounter Vector Attributes for specifying symbol attributes.

-S= size[+ vecmodifiers]

Geographic vector. Here, azimuth (in degrees due east from north) and geographical length must be constitute after the location [and value] columns. The size is the length of the vector head. Vector width is prepare by -W. See Vector Attributes for specifying attributes. Note: Geovector stems are drawn as thin filled polygons and hence pen attributes similar dashed and dotted are non available. For allowable geographical units for the length, see Units [k]. If your length is not in distance units merely in arbitrary user units (e.thousand., a rate in mm/yr) then y'all can apply the -i choice to calibration the corresponding column via the +due south scale modifier.

The next symbol is the programmable custom symbol:

_images/GMT_base_symbols6.png

Custom symbols are designed using the Custom Symbol Macro Linguistic communication. We supply about 40 custom symbols, and users have contributed field of study-specific symbols for structural geology and marine biological science that you can explore from the RESOURCES page, then you take lots of examples to utilize as a template. The linguistic communication allows you to blueprint symbols that take many parameters and can make decisions based on these parameters.

-Sk name/size

mustom symbol. We will look for a symbol definition file chosen proper name.def in (ane) the current directory, (two) in ~/.gmt or (3) in $GMT_SHAREDIR/custom. The symbol defined in the definition file is of normalized unit of measurement size by default; the appended size will scale the symbol accordingly. Users may create their own custom *.def files; come across Custom Symbols below. Alternatively, you can supply an EPS file instead of a *.def file and we will scale and place that graphic as a symbol.

The last group of symbols are all special lines with embellishments forth them. The kickoff symbol is chosen a front end and has specific symbols distributed along the curve. Typical uses are weather fronts, error lines, and more. While the line appearance is controlled by -W, in that location are many modifiers to control the selection and appearance of the along-line symbols:

_images/GMT_base_symbols7.png

Fronts offer diverse symbols, such as squares, triangles and circles that may exist plotted centered or as a half-symbols on 1 side. Special options exist for indicating motion (e.g., faults) forth a line.

-Sf[±]gap[/size][+l|+r][+b|c|f|s[angle]|t|five][+o offset][+p[pen]].

Draw a front. Supply distance gap betwixt symbols and symbol size. If gap is negative, information technology is interpreted to mean the number of symbols along the front instead. If gap has a leading + then we apply the value exactly as given [Default will start and finish each line with a symbol, hence the gap is adjusted to fit]. If size is missing information technology 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 correct side of the front [Default is centered]. Suspend + blazon to specify which symbol to plot: box, circle, fault, slip, triangle or inverted triangle. [Default is fault]. Slip ways left-lateral or right-lateral strike-skid arrows (centered is not an selection). The +southward modifier optionally accepts the bending used to depict the vector [twenty]. Alternatively, apply +Due south which draws arcuate arrow heads. Suspend +o offset to offset the showtime symbol from the beginning of the front past that amount [0]. The chosen symbol is drawn with the aforementioned pen every bit fix for the line (i.e., via -Due west). To use an alternating pen, append +p pen. To skip the outline, just use +p with no argument. To make the main forepart line invisible, add +i. Annotation: By placing -Sf options in the segment headers that differ from the one on the command line you tin change the front types on a segment-past-segment basis.

The side by side blazon of embellished line is called a quoted line, which is our term for a line with text along it, similar to an annotated contour in a contour map. There is a rich set of directives and modifiers bachelor to select a specific outcome:

_images/GMT_base_symbols8.png

Quoted lines (-Sq) are lines with text. Even so, the text can be static, read via files, or be quantities computed along the line. This case just shows a wiggly line with a text-aligned label. A rich set of modifier controls the advent.

-Sq d|D|f|50|L|n|Northward|s|S|x|X posinfo[:labelinfo]

quoted line, i.east., lines with occasional annotations such as contours. Append a required algorithm code and posinfo that control the placement of labels forth the quoted lines. Note: The colon separates the algorithm settings from the label information. Choose amidst vi controlling algorithms:

d dist[c|i|p] or D dist[d|east|f|k|k|G|n|due south]

For lower example d, requite distances between labels on the plot in your preferred measurement unit c (cm), i (inch), or p (points), while for upper example D, specify distances in map units and suspend the unit; choose amongst e (m), f (foot), k (km), M (mile), n (nautical mile) or u (US survey pes), and d (arc caste), m (arc minute), or s (arc second). [Default is 10c or 4i]. Equally an option, yous can append /fraction which is used to identify the very start label for each contour when the cumulative along-contour distance equals fraction * dist [0.25].

f ffile.txt

Read the ASCII file ffile.txt and places labels at locations in the file that matches locations along the quoted lines. Inexact matches and points exterior the region are skipped.

l|Fifty line1[,line2,…]

Give the coordinates of the cease points for 1 or more than comma-separated straight line segments. Labels will exist placed where these lines intersect the quoted lines. The format of each line specification is start_lon/start_lat/stop_lon/stop_lat. Both start_lon/start_lat and stop_lon/stop_lat can be replaced by a 2-character fundamental that uses the justification format employed in text to point a indicate on the frame or eye of the map, given every bit [LCR][BMT]. Alternatively, select Fifty to interpret the signal pairs as defining cracking circumvolve segments [Default is direct lines].

n|Northward n_label

Specify the number of equidistant labels for quoted lines [1]. Upper case Due north starts labeling exactly at the start of the line [Default centers them along the line]. N-1 places 1 justified label at outset, while North+i places one justified label at the end of quoted lines. Optionally, suspend /min_dist[c|i|p] to enforce that a minimum altitude separation between successive labels is enforced.

s|South n_label

Same as n|N n_label but implies that the input data are first to exist converted into a series of 2-point line segments before plotting.

10|Ten xfile.txt

Read the ASCII multisegment file xfile.txt and places labels at the intersections between the quoted lines and the lines in xfile.txt. X volition resample the lines first along great-circumvolve arcs. In addition, you may optionally append +r radius[c|i|p] to set a minimum label separation in the x-y plane [no limitation].

The optional labelinfo controls the specifics of the characterization formatting. If non provided nosotros default to the text "N/A". The argument consists of a concatenated string fabricated upwards of any of the following modifiers:

+a bending

Forcefulness annotations at a fixed bending, +an for line-normal, or +ap for line-parallel [Default].

+c dx[/dy]

Set clearance between label and optional text box. Append c|i|p to specify the unit or % to indicate a percent of the characterization font size [15%].

+d[pen]

Turn on debug, which will draw helper points and lines to illustrate the workings of the quoted line setup. Optionally append the pen to apply [MAP_DEFAULT_PEN].

+e

Delay plotting of the text. This is used to build a clip path based on the text, then lay down other overlays while that prune path is in effect, and then turning off clipping with clip -Cs which finally plots the awaiting text.

+f font

Fix the desired font [Default FONT_ANNOT_PRIMARY with its size changed to 9p].

+g[color]

Select opaque text boxes [Default is transparent]; optionally specify the colour [Default is PS_PAGE_COLOR].

+i

Brand the main quoted line invisible [Draw information technology per -Due west].

+j merely

Set label justification [Default is MC]. Ignored when -SqN|n+|-1 is used.

+l label

Set the constant label text. Note: if the text length exceeds the line length then no text volition appear.

+Fifty flag

Set the characterization text according to the specified flag:

+Lh Take the label from the current segment header (first scan for an embedded -L characterization option, if non 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 equally the label; append c|i|p as the unit [Default is PROJ_LENGTH_UNIT]. +LD Calculate actual map distances; append d|e|f|thousand|n|Thousand|n|s as the unit of measurement [Default is d(egrees), unless characterization placement was based on map distances along the lines in which case we use the aforementioned unit specified for that algorithm]. Requires a map project to be used. +Lf Utilise text subsequently the 2nd column in the fixed characterization location file as the characterization. Requires the stock-still label location setting. +60 Equally +Lh but utilize the headers in the xfile.txt instead. Requires the crossing file option.

+n dx[/dy]

Nudge the placement of labels by the specified amount (append c|i|p to specify the units). Increments are considered in the coordinate system divers past the orientation of the line; use +Northward to force increments in the plot x/y coordinates system [no nudging]. Non allowed with +v.

+o

Select rounded rectangular text box [Default is rectangular]. Not applicative for curved text (+five) and just makes sense for opaque text boxes.

+p[pen]

Depict outline of text boxes [Default is no outline]; optionally specify pen for outline [Default is width = 0.25p, color = blackness, style = solid].

+r min_rad

Will non place labels where the line's radius of curvature is less than min_rad [Default is 0].

+t[file]

Relieve line label 10, y, angle, text to file [Line_labels.txt].

+u unit

Append unit to all line labels [Default is no unit].

+v

Specify curved labels following the path [Default is straight labels].

+due west

Specify how many (ten,y) points volition be used to judge smooth characterization angles [Default is x].

+x[starting time,concluding]

Append the suffixes first and last to the corresponding labels. This modifier is only bachelor when -SqN2 is in effect. Used to annotate the start and terminate of a line (e.g., a cantankerous-section), append two text strings separated by comma [Default only adds a prime to the 2d label].

+= prefix

Prepend prefix to all line labels [Default is no prefix].

Notation: By placing -Sq options in the segment headers that differ from the i on the command line you can change the quoted text attributes on a segment-by-segment basis.

The final blazon of embellished line is called a busy line (-Southward~). It is a hybrid betwixt a front and quoted lines in that it offers symbols like to a front end but the placement can be specified in ways similar to the quoted line. Yet, no built-in clipping exists, such every bit for quoted lines:

_images/GMT_base_symbols9.png

Decorated lines with eleven squares evenly spaced along the line. Past default, the symbol is aligned with the line trend, merely numerous modifiers allow y'all to customize the appearance, including to make the line invisible.

-S~ d|D|f|l|L|due north|N|due south|S|10|10 posinfo:symbolinfo

Decorated line, i.eastward., lines with symbols placed along them. Append a required algorithm code and posinfo that command the placement of symbols forth the decorated lines. Note: The colon separates the algorithm settings from the required symbol data. Choose among vi decision-making algorithms:

d dist[c|i|p] or D dist[d|e|f|thou|m|M|n|south]

For lower case d, give distances betwixt symbols on the plot in your preferred measurement unit of measurement c (cm), i (inch), or p (points), while for upper example D, specify distances in map units and append the unit; choose among e (m), f (foot), thousand (km), M (mile), n (nautical mile) or u (US survey foot), and d (arc caste), m (arc minute), or s (arc second). [Default is 10c or 4i]. As an selection, you lot can append /fraction which is used to identify the very first symbol for each line when the cumulative forth-line altitude equals fraction * dist [0.25].

f ffile.txt

Read the ASCII file ffile.txt and places symbols at locations in the file that matches locations along the decorated lines. Inexact matches and points exterior the region are skipped.

l|L line1[,line2,…]

Give the coordinates of the end points for one or more comma-separated directly line segments. Symbols will be placed where these lines intersect the decorated lines. The format of each line specification is start_lon/start_lat/stop_lon/stop_lat. Both start_lon/start_lat and stop_lon/stop_lat can exist replaced past a 2-character key that uses the justification format employed in text to indicate a point on the frame or center of the map, given equally [LCR][BMT]. 50 will interpret the point pairs as defining keen circles [Default is straight line].

n|N n_symbol

Specify the number of equidistant symbols for decorated lines [1]. Upper case N starts placing symbols exactly at the starting time of the line [Default centers them along the line]. Due north-1 places one symbol at outset, while Due north+ane places 1 symbol at the cease of decorated lines. Optionally, suspend /min_dist[c|i|p] to enforce that a minimum distance separation between successive symbols is enforced.

s|S n_symbol
Aforementioned as n|N n_symbol merely implies that the input information are

first to be converted into a series of 2-signal line segments before plotting.

x|X xfile.txt

Read the ASCII multisegment file xfile.txt and places symbols at the intersections between the decorated lines and the lines in xfile.txt. X will resample the lines first along great-circle arcs.

The required symbolinfo controls the specifics of the symbol pick and formatting and consists of a concatenated string fabricated up of whatever of the following modifiers:

+a angle

Forcefulness symbols at a fixed angle, +an for line-normal, or +ap for line-parallel [Default].

+d[pen]

Turn on debug, which will draw helper points and lines to illustrate the workings of the decorated line setup. Optionally append the pen to use [MAP_DEFAULT_PEN].

+thousand[fill]

Prepare the symbol fill [no fill].

+i

Make the main decorated line invisible [Draw it using pen settings provided past -West].

+north dx[/dy]

Nudge the placement of symbols by the specified amount (append c|i|p to specify the units). Increments are considered in the coordinate system defined by the orientation of the line; use +N to force increments in the plot 10/y coordinates system [no nudging].

+p[pen]

Draw the outline of symbols [Default is no outline]; optionally specify pen for outline [Default is width = 0.25p, color = blackness, manner = solid].

+south<symbol><size> or +sk customsymbol/size

Specify the lawmaking and size of the decorative symbol. Custom symbols need to be unproblematic, i.e., not crave data columns, or give a single EPS file.

+west

Specify how many (x,y) points will be used to estimate symbol angles [Default is x].

If neither +g nor +p are gear up we select the default pen outline (MAP_DEFAULT_PEN). Notation: Past placing -S~ options in the segment headers that differ from the 1 on the command line you can change the decorated lines on a segment-past-segment footing.

-T

Ignore all input files. If -B is not used and so -R -J are not required. Typically used to motion plot origin via -10 and -Y.

-U[label|+c][+j just][+o dx[/dy]]

Depict GMT time stamp logo on plot. (Meet full description) (See cookbook information).

-V[level]

Select verbosity level [due west]. (See full description) (See cookbook information).

-W[pen][attr] (more …)

Set pen attributes for lines or the outline of symbols [Defaults: width = default, colour = black, style = solid]. If the modifier +cl is appended so the color of the line are taken from the CPT (see -C). If instead modifier +cf is appended and so the color from the cpt file is applied to symbol fill. Use just +c for both effects. Yous tin can also suspend 1 or more additional line attribute modifiers: +o offset unit will start and finish drawing the line the given distance offsets from the end point. Append unit unit of measurement from c|i|p to indicate plot altitude on the map or append map distance units instead (see beneath) [Cartesian distances]; +southward will draw the line using a Bezier spline [linear spline]; +five vspecs will identify a vector head at the ends of the lines. You can use +vb and +ve to specify separate vector specs at each end [shared specs]. Considering +v may take additional modifiers it must necessarily exist given at the finish of the pen specification. Run into the Vector Attributes for more information. If -Z is set, then append +z to -W to assign pen color via -C cpt and the z-values obtained. Finally, if pen color = automobile[-segment] or automobile-table then nosotros volition cycle through the pen colors implied past COLOR_SET and change on a per-segment or per-tabular array basis. The width, mode, or transparency settings are unchanged.

-10[a|c|f|r][xshift]

Shift plot origin. (Encounter full description) (See cookbook data).

-Y[a|c|f|r][yshift]

Shift plot origin. (Encounter full description) (See cookbook information).

-Z value|file

Instead of specifying a symbol or polygon fill and outline color via -K and -Westward, give both a value via -Z and a color lookup table via -C. Alternatively, give the name of a file with one z-value (read from the final column) for each polygon in the input data. To apply the color obtained to a fill, use -K+z; to use it to the pen color, append +z to -W.

-a[[col=]proper name[,]] (more than …)

Set aspatial cavalcade associations col=proper noun.

-bi record[+b|l] (more …)

Select native binary format for primary tabular array input. [Default is the required number of columns given the chosen settings].

-di nodata[+c col] (more …)

Replace input columns that equal nodata with NaN.

-e[~]"blueprint" | -e[~]/regexp/[i] (more …)

Just accept information records that match the given blueprint.

-f[i|o]colinfo (more …)

Specify data types of input and/or output columns.

-g 10|y|z|d|X|Y|D gap[u][+a][+c col][+due north|p] (more …)

Make up one's mind data gaps and line breaks. The -one thousand choice is ignored if -S is fix.

-h[i|o][north][+c][+d][+1000 segheader][+r remark][+t title] (more …)

Skip or produce header tape(s).

-i cols[+50][+d divisor][+s scale|d|k][+o offset][,][,t[word]] (more …)

Select input columns and transformations (0 is showtime column, t is trailing text, append discussion to read one word only).

-l[characterization][+D pen][+G gap][+H header][+L[code/]txt][+N cols][+S size[/height]][+V[pen]][+f font][+g fill up][+j just][+o off][+p pen][+s calibration][+w width] (more than …)

Add together a legend entry for the symbol or line being plotted.

-qi[~]rows|limits[+c col][+a|t|s] (more …)

Select input rows or data limit(s) [default is all rows].

-:[i|o] (more than …)

Bandy 1st and 2nd cavalcade on input and/or output.

-p[10|y|z]azim[/elev[/zlevel]][+w lon0/lat0[/z0]][+5 x0/y0] (more than …)

Select perspective view.

-t[transp[/transp2]][+f][+s]

Set transparency level for an overlay, in [0-100] pct range. [Default is 0, i.e., opaque]. Merely visible when PDF or raster format output is selected. But the PNG format selection adds a transparency layer in the prototype (for farther processing). If given, transp applies to both fill and stroke, merely you tin limit the transparency to one of them by appending +f or +south for fill or stroke, respectively. Alternatively, suspend /transp2 to set carve up transparencies for fills and strokes. If no transparencies are given then we expect to read them from the terminal numerical column(southward). Employ the modifiers to indicate which one(due south) we should be reading (if both are requested, fill transparency is expected before stroke transparency in the column order). If just -t is given then we interpret it to mean -t+f for fill up transparency only.

-wy|a|w|d|h|chiliad|s|c period[/phase][+c col] (more …)

Catechumen an input coordinate to a cyclical coordinate.

-^ or just -

Impress a short message most the syntax of the command, then exit (Note: on Windows just use -).

-+ or just +

Print an extensive usage (assistance) message, including the explanation of any module-specific option (but not the GMT common options), and then exit.

-? or no arguments

Impress a consummate usage (help) message, including the explanation of all options, then go out.

--PAR=value

Temporarily override a GMT default setting; repeatable. See gmt.conf for parameters.

Units¶

For map distance unit of measurement, append unit d for arc degree, k for arc minute, and s for arc second, or e for meter [Default unless stated otherwise], f for foot, k for km, Chiliad for statute mile, north for nautical mile, and u for Us survey pes. By default we compute such distances using a spherical approximation with nifty circles (-jg) using the authalic radius (see PROJ_MEAN_RADIUS). You can use -jf to perform "Flat Earth" calculations (quicker but less accurate) or -je to perform exact geodesic calculations (slower but more than accurate; see PROJ_GEODESIC for method used).

Vector Attributes¶

_images/GMT_vector.png

Vector attributes are controlled past options and modifiers. We volition refer to this figure and the labels therein when introducing the corresponding modifiers. All vectors require yous to specify the begin bespeak \(x_b, y_b\) and the end point \(x_e, y_e\), or alternatively the direction d and length L, while for map projections we usually specify the azimuth \(\alpha\) instead.

Several modifiers may be appended to vector-producing options for specifying 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 starting time bespeak (b) to the end indicate (e) of a line segment:

+a bending sets the bending \(\theta\) of the vector caput apex [30].

+b places a vector head at the beginning of the vector path [none]. Optionally, append t for a last line, c for a circle, a for arrow [Default], i for tail, A for patently open arrow, and I for apparently open up tail. Notation: For geovectors only a and A are available. Further append l|r to just draw the left or right half-sides of this head [both sides].

+c selects the vector data quantity magnitude for use with CPT colour wait-up [Default requires a separate data column following the two or 3 coordinates]. Requires that information quantity scaling (with unit of measurement q via +v or +z) and a CPT have been selected.

+east places a vector head at the end of the vector path [none]. Optionally, append t for a final line, c for a circle, a for arrow [Default], i for tail, A for plain open arrow, and I for plain open up tail. Note: For geovectors simply a and A are available. Further append fifty|r to merely draw the left or correct half-sides of this head [both sides].

+g[make full] sets the vector caput fill up [Default fill is used, which may exist no fill]. Plough off vector head fill by not appending a fill up. Some modules have a carve up -G fill option and if used will select the make full also.

+h shape sets the shape of the vector caput (range -2/2). Default is controlled by MAP_VECTOR_SHAPE [default is theme dependent]. A nothing value produces no notch. Positive values moves the notch toward the caput noon while a negative value moves information technology away. The instance above uses +h0.v.

+thou places a vector head at the mid-bespeak the vector path [none]. Append f or r for forward or reverse direction of the vector [forward]. Optionally, suspend t for a last line, c for a circumvolve, a for pointer [Default], i for tail, A for plain open pointer, and I for evidently open tail. Farther append l|r to only depict the left or correct half-sides of this head [both sides]. Cannot be combined with +b or +e.

+n[norm[/min]] scales down vector attributes (pen thickness, head size) with decreasing length, where vector plot lengths shorter than norm will accept their attributes scaled past length/norm [other arrow attributes remain invariant to length]. Optionally, append /min for the minimum shrink factor (in the 0-i range) that we will compress to [0.25]. For Cartesian vectors, please specify a norm in plot units, while for geovectors specify a norm in map units (see Distance units) [thou]. Alternatively, append unit of measurement q to indicate we should employ user quantity units in making the decision; this ways the user also must select user quantity input via +v or +z.

If no argument is given then +n ensures vector heads are not shrunk and e'er plotted regardless of vector length [Vector heads are non plotted if exceeding vector length].

+o[plon/plat] specifies the oblique pole for the great or pocket-size circles. Only needed for great circles if +q is given. If no pole is appended then we default to the north pole. Input arguments are then lon lat arclength with the latter in map distance units; see +q of athwart limits instead.

+p[pen] sets the vector pen attributes. If no pen is appended then the caput outline is non drawn. [Default pen is half the width of stalk pen, and head outline is fatigued]. Above, we used +p2p,orange. The vector stalk attributes are controlled by -Due west.

+q means the input direction, length data instead represent the offset and stop opening angles of the arc segment relative to the given indicate. See +o to specify a specific pole for the arc [north pole].

+t[b|e]trim will shift the starting time or end signal (or both) along the vector segment past the given trim; append suitable unit of measurement (c, i, or p). If the modifiers b|east are not used then trim may be two values separated by a slash, which is used to specify different trims for the start and cease. Positive trims will shorted the vector while negative trims volition lengthen it [no trim].

In add-on, all but circular vectors may accept these modifiers:

+j simply determines how the input x,y point relates to the vector. Choose from beginning [default], end, or center.

+s ways the input angle, length are instead the \(x_e, y_e\) coordinates of the vector end point.

Finally, Cartesian vectors and geovectors may accept these modifiers (except in grdvector) which can be used to catechumen vector components to polar grade or magnify user quantity magnitudes into plot lengths.

+five[i|l]calibration expects a scale to magnify the polar length in the given unit of measurement. If i is prepended we utilise the inverse calibration while if 50 is prepended then it is taken every bit a fixed length to override input lengths. Append unit q if input magnitudes are given in user quantity units and nosotros will scale them to current plot unit for Cartesian vectors (see PROJ_LENGTH_UNIT for how to alter the plot unit of measurement) or to km for geovectors. In improver, if +c is selected and then the vector magnitudes may exist used for CPT color-lookup (and no extra data column is required past -C).

+z[scale] expects input \(\Delta x, \Delta y\) vector components and uses the scale [ane] to convert to polar coordinates with length in given unit. Append unit of measurement q if input components are given in user quantity units and nosotros will calibration to current plot unit for Cartesian vectors (see PROJ_LENGTH_UNIT for how to modify the plot unit) or to km for geovectors. In improver, if +c is selected so the vector magnitudes may be used for CPT color-lookup (and no actress information column is required by -C).

Note: Vectors were completely redesigned for GMT5 which separated the vector head (a polygon) from the vector stem (a line). In GMT4, the entire vector was a polygon and it could only be a straight Cartesian vector. Aye, the old GMT4 vector shape remains attainable if you specify a vector (-Sv|V) using the GMT4 syntax, explained hither: size, if present, volition be interpreted as \(t_w/h_l/h_w\) or tailwidth/headlength/halfheadwidth [Default is 0.075c/0.3c/0.25c (or 0.03i/0.12i/0.1i)]. Past default, arrow attributes remain invariant to the length of the arrow. To have the size of the vector scale down with decreasing size, append +north norm, where vectors shorter than norm will have their attributes scaled by length/norm. To center the vector on the balance betoken, use -Svb; to align indicate with the vector head, utilize -Svh; to align point with the vector tail, utilise -Svt [Default]. To give the head point's coordinates instead of direction and length, use -Svs. Upper example B, H, T, S volition draw a double-headed vector [Default is single head]. Notation: If \(h_l/h_w\) are given as 0/0 and so but the head-less vector stick will be plotted.

_images/GMT_vector4.png

A GMT 4 vector has no divide pen for the stem -- it is all function of a Cartesian polygon. You may optionally fill and describe its outline. The modifiers listed in a higher place generally do not apply. Annotation: While the tailwidth (\(t_w\)) and headlength (\(h_l\)) parameters are given as indicated, the halfheadwidth (\(h_w\)) is oddly given as the half-width in GMT four so we retain that convention here (only accept updated the documentation; blue lines signal these three parameters).

Classic Way Arguments¶

These options are used to dispense the building of layered GMT PostScript plots in classic mode. They are not available when using GMT modern style.

-K (more than …)

Do not finalize the PostScript plot.

-O (more …)

Suspend to existing PostScript plot.

-P (more than …)

Select "Portrait" plot orientation.

Examples¶

Notation: Below are some examples of valid syntax for this module. The examples that use remote files (file names starting with @ ) can be cut and pasted into your terminal for testing. Other commands requiring input files are simply dummy examples of the types of uses that are common but cannot be run verbatim every bit written.

To plot solid crimson circles (diameter = 0.2 cm) at the positions listed in the file DSDP.txt on a Mercator map at 0.iii cm/degree of the area 100E to 160E, 20S to 30N, with automated tick-marks and gridlines, use

                gmt psxy DSDP.txt -R100/160/-20/30 -Jm0.3c -Sc0.2c -Gred -Bafg > map.ps              

To plot the xyz values in the file quakes.xyzm equally circles with size given by the magnitude in the 4th column and color based on the depth in the 3rd using the CPT rgb.cpt on a linear map, utilise

                gmt psxy quakes.xyzm -R0/1000/0/m -JX6i -Sc -Crgb -B200 > map.ps              

To plot the file trench.txt on a Mercator map, with white triangles with sides 0.25 inch on the left side of the line, spaced every 0.viii inch, use

                gmt psxy trench.txt -R150/200/20/50 -Jm0.15i -Sf0.8i/0.1i+l+t -Gwhite -W -Baf > map.ps              

To plot a point with color dictated by the t.cpt file for the z-value 65, try

                                echo                175                30                |                gmt psxy -R150/200/20/50 -JX15c -Sc0.5c -Zf65 -Ct.cpt > map.ps              

To plot the data in the file misc.txt as symbols determined by the code in the last column, and with size given by the magnitude in the 4th column, and colour based on the 3rd column via the CPT chrome on a linear map, utilise

                gmt psxy misc.txt -R0/100/-50/100 -JX6i -Southward -Cchrome -B20 > map.ps              

If y'all need to place vectors on a plot y'all tin can choose among straight Cartesian vectors, math round vectors, or geo-vectors (these form small or great circles on the Earth). These can take optional heads at either cease, and heads may be the traditional pointer, a circle, or a last cross-line. To place a few vectors with a circle at the commencement location and an arrow head at the terminate, try

                gmt psxy -R0/50/-50/fifty -JX6i -Sv0.15i+bc+ea -Gyellow -W0.5p -Baf                << EOF > map.ps                x x 45 2i                xxx -xx 0 ane.5i                EOF              

To plot vectors (red vector heads, solid stem) from the file data.txt that contains record of the form lon, lat, dx, dy, where dx, dy are the Cartesian vector components given in user units, and these user units should be converted to cm given the scale three.60, try

                gmt psxy -R20/40/-20/0 -JM6i -Sv0.15i+e+z3.6c -Gred -W0.25p -Baf data.txt > map.ps              

Custom Symbols¶

GMT allows users to define and plot their own custom symbols. This is done by encoding the symbol using our custom symbol macro code described in Appendix North. Put all the macro codes for your new symbol in a file whose extension must be .def; y'all may then address the symbol without giving the extension (e.yard., the symbol file tsunami.def is used by specifying -Sk seismic sea wave/size. The definition file can contain any number of plot code records, as well as bare lines and comment lines (starting with #). The module will look for the definition files in (ane) the current directory, (2) the ~/.gmt directory, and (3) the $GMT_SHAREDIR/custom directory, in that order. Freeform polygons (made up of direct line segments and arcs of circles) tin be designed - these polygons tin be painted and filled with a design. Other standard geometric symbols tin can also be used. See Appendix Custom Plot Symbols for macro definitions.

GMT4 Vector¶

Note: The quondam-style, single-polygon vector available in GMT4 and earlier versions has been added to GMT5 for backwards compatibility with old scripts. For reference, the former vector syntax is listed here: The size, if present, will be interpreted as arrowwidth/headlength/headwidth. Past default, pointer attributes remain invariant to the length of the arrow. To have the size of the vector calibration down with decreasing length, suspend n norm, then that vectors shorter than norm will have their dimensions scaled by the vector length divided past norm. To center the vector on the balance (mid) betoken, employ -Svb; to align signal with the vector head, apply -Svh; to align bespeak with the vector tail, use -Svt [Default]. If the input has the head point'southward coordinates instead of direction and length, employ -Svs. Upper case B, H, T, or South volition draw a double-headed vector [Default is unmarried head].

Polar Caps¶

We volition automatically determine if a closed polygon is containing a geographic pole, i.eastward., being a polar cap. Such polygons requires special treatment under the hood to ensure proper filling. Many tools such as GIS packages are unable to handle polygons covering a pole and some cannot handle polygons crossing the Dateline. They work around this problem by splitting polygons into a west and east polygon or inserting artificial helper lines that makes a cut into the pole and back. Such doctored polygons may exist misrepresented in GMT.

Bezier spline¶

The +southward modifier to pen settings (-Westward) is limited to plotting lines and polygons. Lines with embellishments (fronts, busy, or quoted lines) are excluded.

Auto-Fable¶

The -l option for symbols expects the symbol color, size, and type to be given on the control line. If you take variable symbol sizes and so you must append +due south size to fix a suitable size for the fable entry. For other symbol cases the -l option volition be ignored. Fable entries also work for lines and polygons, but not more than complicated features such equally busy and quoted lines, fronts, etc.

Information Cavalcade Order¶

The -Southward option determines how many size columns are required to generate the selected symbol, but if size is non given so we await to read size from file. In improver, your use of options -H, -I and -t will require extra columns. The order of the data record is fixed regardless of option order, even if non all items may be activated. Nosotros expect data columns to come in the post-obit order:

              x y              [z]              [size-columns]              [calibration]              [intens]              [transp              [transp2]]              [trailing-text]            

where items given in brackets are optional and nether the control of the stated options: -C selects the optional z cavalcade for color-lookup, -S without a size selects the optional size-columns (may exist more one depending on the selected symbol), -H selects the optional scale column, -I selects the optional intens column, and -t selects the optional transp cavalcade(s). Trailing text is always optional. Notes: (1) If symbol code is not given by -S and so it is expected to showtime the trailing text. (2) You lot can apply -i to rearrange your information record to friction match the expected format.

See Also¶

gmt, gmt.conf, gmtcolors, psbasemap, psxyz