1PSXY(1) Generic Mapping Tools PSXY(1)
2
3
4
6 psxy - Plot lines, polygons, and symbols on maps
7
9 psxy files -Jparameters -Rwest/east/south/north[r] [ -A[m|p] ] [
10 -B[p|s]parameters ] [ -Ccptfile ] [ -Ddx/dy ] [
11 -E[x|y|X|Y][n][cap][/[-|+]pen] ] [ -Gfill ] [ -H[i][nrec] ] [ -Iintens
12 ] [ -K ] [ -L ] [ -N ] [ -O ] [ -P ] [ -S[symbol][size] ] [
13 -U[just/dx/dy/][c|label] ] [ -V ] [ -W[-|+][pen] ] [ -X[a|c|r][x-
14 shift[u]] ] [ -Y[a|c|r][y-shift[u]] ] [ -:[i|o] ] [
15 -bi[s|S|d|D[ncol]|c[var1/...]] ] [ -ccopies ] [ -fcolinfo ] [
16 -g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] ] [ -m[flag] ]
17
19 psxy reads (x,y) pairs from files [or standard input] and generates
20 PostScript code that will plot lines, polygons, or symbols at those
21 locations on a map. If a symbol is selected and no symbol size given,
22 then psxy will interpret the third column of the input data as symbol
23 size. Symbols whose size is <= 0 are skipped. If no symbols are spec‐
24 ified then the symbol code (see -S below) must be present as last col‐
25 umn in the input. Multiple segment files may be plotted using the -m
26 option. If -S is not used, a line connecting the data points will be
27 drawn instead. To explicitly close polygons, use -L. Select a fill
28 with -G. If -G is set, -W will control whether the polygon outline is
29 drawn or not. If a symbol is selected, -G and -W determines the fill
30 and outline/no outline, respectively. The PostScript code is written
31 to standard output.
32
33 files List one or more file-names. If no files are given, psxy will
34 read standard input. Use -T to ignore all input files, includ‐
35 ing standard input (see below).
36
37 -J Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or
38 width in UNIT (upper case modifier). UNIT is cm, inch, or m,
39 depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
40 can be overridden on the command line by appending c, i, or m to
41 the scale/width value. When central meridian is optional,
42 default is center of longitude range on -R option. Default
43 standard parallel is the equator. For map height, max dimen‐
44 sion, or min dimension, append h, +, or - to the width, respec‐
45 tively.
46 More details can be found in the psbasemap man pages.
47
48 CYLINDRICAL PROJECTIONS:
49
50 -Jclon0/lat0/scale (Cassini)
51 -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
52 -Jj[lon0/]scale (Miller)
53 -Jm[lon0/[lat0/]]scale (Mercator)
54 -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
55 lel)
56 -Jo[a]lon0/lat0/azimuth/scale (Oblique Mercator - point and
57 azimuth)
58 -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
59 -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and
60 pole)
61 -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
62 -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
63 -Juzone/scale (UTM - Universal Transverse Mercator)
64 -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
65
66 CONIC PROJECTIONS:
67
68 -Jblon0/lat0/lat1/lat2/scale (Albers)
69 -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
70 -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
71 -Jpoly/[lon0/[lat0/]]scale ((American) Polyconic)
72
73 AZIMUTHAL PROJECTIONS:
74
75 -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
76 -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
77 -Jflon0/lat0[/horizon]/scale (Gnomonic)
78 -Jglon0/lat0[/horizon]/scale (Orthographic)
79 -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
80 (General Perspective).
81 -Jslon0/lat0[/horizon]/scale (General Stereographic)
82
83 MISCELLANEOUS PROJECTIONS:
84
85 -Jh[lon0/]scale (Hammer)
86 -Ji[lon0/]scale (Sinusoidal)
87 -Jkf[lon0/]scale (Eckert IV)
88 -Jk[s][lon0/]scale (Eckert VI)
89 -Jn[lon0/]scale (Robinson)
90 -Jr[lon0/]scale (Winkel Tripel)
91 -Jv[lon0/]scale (Van der Grinten)
92 -Jw[lon0/]scale (Mollweide)
93
94 NON-GEOGRAPHICAL PROJECTIONS:
95
96 -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
97 -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]] (Linear, log,
98 and power scaling)
99
100 -R xmin, xmax, ymin, and ymax specify the Region of interest. For
101 geographic regions, these limits correspond to west, east,
102 south, and north and you may specify them in decimal degrees or
103 in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left
104 and upper right map coordinates are given instead of w/e/s/n.
105 The two shorthands -Rg and -Rd stand for global domain (0/360
106 and -180/+180 in longitude respectively, with -90/+90 in lati‐
107 tude). Alternatively, specify the name of an existing grid file
108 and the -R settings (and grid spacing, if applicable) are copied
109 from the grid. For calendar time coordinates you may either
110 give (a) relative time (relative to the selected TIME_EPOCH and
111 in the selected TIME_UNIT; append t to -JX|x), or (b) absolute
112 time of the form [date]T[clock] (append T to -JX|x). At least
113 one of date and clock must be present; the T is always required.
114 The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
115 calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
116 string must be of the form hh:mm:ss[.xxx]. The use of delim‐
117 iters and their type and positions must be exactly as indicated
118 (however, input, output and plot formats are customizable; see
119 gmtdefaults).
120
122 No space between the option flag and the associated arguments.
123
124 -A By default line segments are drawn as great circle arcs. To draw
125 them as straight lines, use the -A flag. Alternatively, add m to
126 draw the line by first following a meridian, then a parallel. Or
127 append p to start following a parallel, then a meridian. (This
128 can be practical to draw a lines along parallels, for example).
129
130 -B Sets map boundary annotation and tickmark intervals; see the
131 psbasemap man page for all the details.
132
133 -C Give a color palette file. If -S is set, let symbol fill color
134 be determined by the z-value in the third column. Additional
135 fields are shifted over by one column (optional size would be
136 4th rather than 3rd field, etc.). If -S is not set, then psxy
137 expects the user to supply a multisegment line or polygon file
138 (requires -m) where each segment header contains a -Zval string.
139 The val will control the color of the line or polygon (if -L is
140 set) via the cpt file.
141
142 -D Offset the plot symbol or line locations by the given amounts
143 dx/dy [Default is no offset]. If dy is not given it is set
144 equal to dx.
145
146 -E Draw error bars. Append x and/or y to indicate which bars you
147 want to draw (Default is both x and y). The x and/or y errors
148 must be stored in the columns after the (x,y) pair [or
149 (x,y,size) triplet]. The cap parameter indicates the length of
150 the end-cap on the error bars [0.25c (or 0.1i)]. Pen attributes
151 for error bars may also be set (see SPECIFYING PENS below)
152 [Defaults: width = 0.25p, color = black, texture = solid]. A
153 leading + will use the lookup color (via -C) for both symbol
154 fill and error pen color, while a leading - will set error pen
155 color and turn off symbol fill. If upper case X and/or Y is
156 used we will instead draw "box-and-whisker" (or "stem-and-leaf")
157 symbols. The x (or y) coordinate is then taken as the median
158 value, and 4 more columns are expected to contain the minimum
159 (0% quantile), the 25% quantile, the 75% quantile, and the maxi‐
160 mum (100% quantile) values. The 25-75% box may be filled by
161 using -G. If n is appended to X (or Y) we draw a notched "box-
162 and-whisker" symbol where the notch width reflects the uncer‐
163 tainty in the median. Then a 5th extra data column is expected
164 to contain the number of points in the distribution.
165
166 -G Select color or pattern for filling of symbols or polygons
167 [Default is no fill]. (See SPECIFYING FILL below).
168 Note when -m is chosen, psxy will search for -G and -W strings
169 in all the subheaders and let any values thus found over-ride
170 the command line settings (see -m below).
171
172 -H Input file(s) has header record(s). If used, the default number
173 of header records is N_HEADER_RECS. Use -Hi if only input data
174 should have header records [Default will write out header
175 records if the input data have them]. Blank lines and lines
176 starting with # are always skipped.
177
178 -I Use the supplied intens value (nominally in the -1 to + 1 range)
179 to modulate the fill color by simulating illumination [none].
180
181 -K More PostScript code will be appended later [Default terminates
182 the plot system].
183
184 -L Force closed polygons: connect the endpoints of the line-seg‐
185 ment(s) and draw polygons. Also, in concert with -C, -m, and -Z
186 settings in the headers will use the implied color for polygon
187 fill [Default is polygon pen color].
188
189 -N Do NOT skip symbols that fall outside map border [Default plots
190 points inside border only]. The option does not apply to lines
191 and polygons which are always clipped to the map region.
192
193 -O Selects Overlay plot mode [Default initializes a new plot sys‐
194 tem].
195
196 -P Selects Portrait plotting mode [Default is Landscape, see gmtde‐
197 faults to change this].
198
199 -S Plot symbols. If present, size is symbol size in the unit set
200 in .gmtdefaults4 (unless c, i, m, or p is appended). If size is
201 not given it is expected in the third (or 4th if -C is used)
202 column. Any additional fields are shifted over by one column.
203 If the symbol code (see below) is not given it will be read from
204 the last column in the input data; this cannot be used in con‐
205 junction with -b. Optionally, append c, i, m, p to indicate
206 that the size information in the input data is in units of cm,
207 inch, meter, or point, respectively [Default is MEASURE_UNIT].
208 Note: if you give both size and symbol via the input file you
209 must use MEASURE_UNIT to indicate the units used for the symbol
210 size.
211 The uppercase symbols A, C, D, G, H, I, N, S, T are normalized
212 to have the same area as a circle with diameter size, while the
213 size of the corresponding lowercase symbols refers to the diame‐
214 ter of a circumscribed circle. Choose between these symbol
215 codes:
216
217 -S- x-dash (-). size is the length of a short horizontal line seg‐
218 ment.
219
220 -S+ plus (+). size is diameter of circumscribing circle.
221
222 -Sa star. size is diameter of circumscribing circle.
223
224 -Sb Vertical bar extending from base to y. size is bar width.
225 Append u if size is in x-units [Default is plot-distance units].
226 By default, base = ymin. Append bbase to change this value.
227
228 -SB Horizontal bar extending from base to x. size is bar width.
229 Append u if size is in y-units [Default is plot-distance units].
230 By default, base = xmin. Append bbase to change this value.
231
232 -Sc circle. size is diameter of circle.
233
234 -Sd diamond. size is diameter of circumscribing circle.
235
236 -Se ellipse. Direction (in degrees counter-clockwise from horizon‐
237 tal), major_axis, and minor_axis must be found in columns 3, 4,
238 and 5.
239
240 -SE Same as -Se, except azimuth (in degrees east of north) should be
241 given instead of direction. The azimuth will be mapped into an
242 angle based on the chosen map projection (-Se leaves the direc‐
243 tions unchanged.) Furthermore, the axes lengths must be given
244 in km instead of plot-distance units. An exception occurs for a
245 linear projection in which we assume the ellipse axes are given
246 in the same units as -R.
247
248 -Sf front. -Sfgap/size[dir][type][:offset]. Supply distance gap
249 between symbols and symbol size. If gap is negative, it is
250 interpreted to mean the number of symbols along the front
251 instead. Append dir to plot symbols on the left or right side
252 of the front [Default is centered]. Append type to specify
253 which symbol to plot: box, circle, fault, slip, or triangle.
254 [Default is fault]. Slip means left-lateral or right-lateral
255 strike-slip arrows (centered is not an option). Append :offset
256 to offset the first symbol from the beginning of the front by
257 that amount [Default is 0].
258
259 -Sg octagon. size is diameter of circumscribing circle.
260
261 -Sh hexagon. size is diameter of circumscribing circle.
262
263 -Si inverted triangle. size is diameter of circumscribing circle.
264
265 -Sj Rotated rectangle. Direction (in degrees counter-clockwise from
266 horizontal), x-dimension, and y-dimension must be found in col‐
267 umns 3, 4, and 5.
268
269 -SJ Same as -Sj, except azimuth (in degrees east of north) should be
270 given instead of direction. The azimuth will be mapped into an
271 angle based on the chosen map projection (-Sj leaves the direc‐
272 tions unchanged.) Furthermore, the dimensions must be given in
273 km instead of plot-distance units. An exception occurs for a
274 linear projection in which we assume the dimensions are given in
275 the same units as -R.
276
277 -Sk kustom symbol. Append <name>/size, and we will look for a defi‐
278 nition file called <name>.def in (1) the current directory or
279 (2) in ~/.gmt or (3) in $GMT_SHAREDIR/custom. The symbol as
280 defined in that file is of size 1.0 by default; the appended
281 size will scale symbol accordingly. Users may add their own
282 custom *.def files; see CUSTOM SYMBOLS below.
283
284 -Sl letter or text string (less than 64 characters). Give size, and
285 append /string after the size. Note that the size is only
286 approximate; no individual scaling is done for different charac‐
287 ters. Remember to escape special characters like *. Option‐
288 ally, you may append %font to select a particular font [Default
289 is ANNOT_FONT_PRIMARY].
290
291 -Sm math angle arc, optionally with one or two arrow heads. The
292 size is the radius of the arc. Start and stop directions (in
293 degrees counter-clockwise from horizontal) for arc must be found
294 in columns 3 and 4. Use -Smf to add arrow head at first angle,
295 -Sml for arrow head at last angle, and -Smb for both [Default is
296 no arrow heads].
297
298 -Sn pentagon. size is diameter of circumscribing circle.
299
300 -Sp point. No size needs to be specified (1 pixel is used).
301
302 -Sq quoted line, i.e., lines with annotations such as contours.
303 Append [d|D|f|l|L|n|x|X]info[:labelinfo]. The required argument
304 controls the placement of labels along the quoted lines. Choose
305 among five controlling algorithms:
306
307 ddist[c|i|m|p] or Ddist[d|e|k|m|n]
308 For lower case d, give distances between labels on the
309 plot in your preferred measurement unit c (cm), i (inch),
310 m (meter), or p (points), while for upper case D, specify
311 distances in map units and append the unit; choose among
312 e (m), k (km), m (mile), n (nautical mile), or d (spheri‐
313 cal degree). [Default is 10c or 4i].
314
315 fffile.d
316 Reads the ascii file ffile.d and places labels at loca‐
317 tions in the file that matches locations along the quoted
318 lines. Inexact matches and points outside the region are
319 skipped.
320
321 l|Lline1[,line2,...]
322 Give start and stop coordinates for one or more comma-
323 separated straight line segments. Labels will be placed
324 where these lines intersect the quoted lines. The format
325 of each line specification is start/stop, where start and
326 stop are either a specified point lon/lat or a 2-charac‐
327 ter XY key that uses the justification format employed in
328 pstext to indicate a point on the map, given as
329 [LCR][BMT]. L will interpret the point pairs as defining
330 great circles [Default is straight line].
331
332 nn_label
333 Specifies the number of equidistant labels for quoted
334 lines line [1]. Upper case N starts labeling exactly at
335 the start of the line [Default centers them along the
336 line]. N-1 places one justified label at start, while
337 N+1 places one justified label at the end of quoted
338 lines. Optionally, append /min_dist[c|i|m|p] to enforce
339 that a minimum distance separation between successive
340 labels is enforced.
341
342 x|Xxfile.d
343 Reads the multi-segment file xfile.d and places labels at
344 the intersections between the quoted lines and the lines
345 inxfile.d. X will resample the lines first along great-
346 circle arcs.
347
348 In addition, you may optionally append +rradius[c|i|m|p] to set
349 a minimum label separation in the x-y plane [no limitation].
350
351 The optional labelinfo controls the specifics of the label for‐
352 matting and consists of a concatenated string made up of any of
353 the following control arguments:
354
355 +aangle
356 For annotations at a fixed angle, +an for line-normal, or
357 +ap for line-parallel [Default].
358
359 +cdx[/dy]
360 Sets the clearance between label and optional text box.
361 Append c|i|m|p to specify the unit or % to indicate a
362 percentage of the label font size [15%].
363
364 +d Turns on debug which will draw helper points and lines to
365 illustrate the workings of the quoted line setup.
366
367 +ffont Sets the desired font [Default ANNOT_FONT_PRIMARY].
368
369 +g[color]
370 Selects opaque text boxes [Default is transparent];
371 optionally specify the color [Default is PAGE_COLOR].
372 (See SPECIFYING COLOR below).
373
374 +jjust Sets label justification [Default is MC]. Ignored when
375 -SqN|n+|-1 is used.
376
377 +kcolor
378 Sets color of text labels [Default is COLOR_BACKGROUND].
379 (See SPECIFYING COLOR below).
380
381 +llabel
382 Sets the constant label text.
383
384 +Lflag Sets the label text according to the specified flag:
385
386 +Lh Take the label from the current multisegment
387 header (first scan for an embedded -Llabel option,
388 if not use the first word following the segment
389 flag). For multiple-word labels, enclose entire
390 label in double quotes.
391
392 +Ld Take the Cartesian plot distances along the line
393 as the label; append c|i|m|p as the unit [Default
394 is MEASURE_UNIT].
395
396 +LD Calculate actual map distances; append d|e|k|m|n
397 as the unit [Default is d(egrees), unless label
398 placement was based on map distances along the
399 lines in which case we use the same unit specified
400 for that algorithm]. Requires a map projection to
401 be used.
402
403 +Lf Use text after the 2nd column in the fixed label
404 location file as the label. Requires the fixed
405 label location setting.
406
407 +Lx As +Lh but use the headers in the xfile.d instead.
408 Requires the crossing file option.
409
410 +ndx[/dy]
411 Nudges the placement of labels by the specified amount
412 (append c|i|m|p to specify the units). Increments are
413 considered in the coordinate system defined by the orien‐
414 tation of the line; use +N to force increments in the
415 plot x/y coordinates system [no nudging].
416
417 +o Selects rounded rectangular text box [Default is rectan‐
418 gular]. Not applicable for curved text (+v) and only
419 makes sense for opaque text boxes.
420
421 +p[pen]
422 Draws the outline of text boxsets [Default is no out‐
423 line]; optionally specify pen for outline [Default is
424 width = 0.25p, color = black, texture = solid]. (See
425 SPECIFYING PENS below).
426
427 +rmin_rad
428 Will not place labels where the line's radius of curva‐
429 ture is less than min_rad [Default is 0].
430
431 +ssize Sets the desired font size in points [Default is 9].
432
433 +uunit Appends unit to all line labels. If unit starts with a
434 leading hyphen (-) then there will be no space between
435 label value and the unit. [Default is no unit].
436
437 +v Specifies curved labels following the path [Default is
438 straight labels].
439
440 +w Specifies how many (x, y) points will be used to estimate
441 label angles [Default is 10].
442
443 +=prefix
444 Prepends prefix to all line labels. If prefix starts
445 with a leading hyphen (-) then there will be no space
446 between label value and the prefix. [Default is no pre‐
447 fix].
448
449 -Sr rectangle. No size needs to be specified, but the x- and y-
450 dimensions must be found in columns 3 and 4.
451
452 -Ss square. size is diameter of circumscribing circle.
453
454 -St triangle. size is diameter of circumscribing circle.
455
456 -Sv vector. Direction (in degrees counter-clockwise from horizon‐
457 tal) and length must be found in columns 3 and 4. size, if
458 present, will be interpreted as arrowwidth/headlength/headwidth
459 [Default unit is 0.075c/0.3c/0.25c (or 0.03i/0.12i/0.1i)]. By
460 default arrow attributes remains invariant to the length of the
461 arrow. To have the size of the vector scale down with decreas‐
462 ing size, append nnorm, where vectors shorter than norm will
463 have their attributes scaled by length/norm. To center vector
464 on balance point, use -Svb; to align point with the vector head,
465 use -Svh; to align point with the vector tail, use -Svt
466 [Default]. To give the head point's coordinates instead of
467 direction and length, use -Svs. Upper case B, H, T, S will draw
468 a double-headed vector [Default is single head].
469
470 -SV Same as -Sv, except azimuth (in degrees east of north) should be
471 given instead of direction. The azimuth will be mapped into an
472 angle based on the chosen map projection (-Sv leaves the direc‐
473 tions unchanged.)
474
475 -Sw pie wedge. Start and stop directions (in degrees counter-clock‐
476 wise from horizontal) for pie slice must be found in columns 3
477 and 4.
478
479 -SW Same as -Sw, except azimuths (in degrees east of north) should
480 be given instead of the two directions. The azimuths will be
481 mapped into angles based on the chosen map projection (-Sw
482 leaves the directions unchanged.)
483
484 -Sx cross (x). size is diameter of circumscribing circle.
485
486 -Sy y-dash (|). size is the length of a short vertical line seg‐
487 ment.
488
489 -T Ignore all input files, including standard input. This is the
490 same as specifying /dev/null (or NUL for Windows users) as input
491 file. Use this to activate only the options that are not related
492 to plotting of lines or symbols, such as psxy -R -J -O -T to
493 terminate a sequence of GMT plotting commands without producing
494 any plotting output.
495
496 -U Draw Unix System time stamp on plot. By adding just/dx/dy/, the
497 user may specify the justification of the stamp and where the
498 stamp should fall on the page relative to lower left corner of
499 the plot. For example, BL/0/0 will align the lower left corner
500 of the time stamp with the lower left corner of the plot.
501 Optionally, append a label, or c (which will plot the command
502 string.). The GMT parameters UNIX_TIME, UNIX_TIME_POS, and
503 UNIX_TIME_FORMAT can affect the appearance; see the gmtdefaults
504 man page for details. The time string will be in the locale set
505 by the environment variable TZ (generally local time).
506
507 -V Selects verbose mode, which will send progress reports to stderr
508 [Default runs "silently"].
509
510 -W Set pen attributes for lines or the outline of symbols
511 [Defaults: width = 0.25p, color = black, texture = solid]. A
512 leading + will use the lookup color (via -C) for both symbol
513 fill and outline pen color, while a leading - will set outline
514 pen color and turn off symbol fill. (See SPECIFYING PENS
515 below).
516
517 -X -Y Shift plot origin relative to the current origin by (x-shift,y-
518 shift) and optionally append the length unit (c, i, m, p). You
519 can prepend a to shift the origin back to the original position
520 after plotting, or prepend r [Default] to reset the current
521 origin to the new location. If -O is used then the default (x-
522 shift,y-shift) is (0,0), otherwise it is (r1i, r1i) or (r2.5c,
523 r2.5c). Alternatively, give c to align the center coordinate (x
524 or y) of the plot with the center of the page based on current
525 page size.
526
527 -: Toggles between (longitude,latitude) and (latitude,longitude)
528 input and/or output. [Default is (longitude,latitude)]. Append
529 i to select input only or o to select output only. [Default
530 affects both].
531
532 -bi Selects binary input. Append s for single precision [Default is
533 d (double)]. Uppercase S or D will force byte-swapping.
534 Optionally, append ncol, the number of columns in your binary
535 input file if it exceeds the columns needed by the program. Or
536 append c if the input file is netCDF. Optionally, append
537 var1/var2/... to specify the variables to be read. [Default is
538 the required number of columns given the chosen settings].
539
540 -c Specifies the number of plot copies. [Default is 1].
541
542 -f Special formatting of input and/or output columns (time or geo‐
543 graphical data). Specify i or o to make this apply only to
544 input or output [Default applies to both]. Give one or more
545 columns (or column ranges) separated by commas. Append T (abso‐
546 lute calendar time), t (relative time in chosen TIME_UNIT since
547 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
548 to each column or column range item. Shorthand -f[i|o]g means
549 -f[i|o]0x,1y (geographic coordinates).
550
551 -g Examine the spacing between consecutive data points in order to
552 impose breaks in the line. Append x|X or y|Y to define a gap
553 when there is a large enough change in the x or y coordinates,
554 respectively, or d|D for distance gaps; use upper case to calcu‐
555 late gaps from projected coordinates. For gap-testing on other
556 columns use [col]z; if col is not prepended the it defaults to 2
557 (i.e., 3rd column). Append [+|-]gap and optionally a unit u.
558 Regarding optional signs: -ve means previous minus current col‐
559 umn value must exceed |gap to be a gap, +ve means current minus
560 previous column value must exceed gap, and no sign means the
561 absolute value of the difference must exceed gap. For geo‐
562 graphic data (x|y|d), the unit u may be meter [Default], kilome‐
563 ter, miles, or nautical miles. For projected data (X|Y|D),
564 choose from inch, centimeter, meter, or points [Default unit set
565 by MEASURE_UNIT]. Note: For x|y|z with time data the unit is
566 instead controlled by TIME_UNIT. Repeat the option to specify
567 multiple criteria, of which any can be met to produce a line
568 break. Issue an additional -ga to indicate that all criteria
569 must be met instead. The -g option is ignored if -S is set.
570
571 -m Multiple segment file. Segments are separated by a record whose
572 first character is flag [Default is '>']. On these segment
573 header records one or more of the following options can be
574 added:
575 -Gfill Use the new fill and turn filling on
576 -G- Turn filling off
577 -G+ Revert to default fill (none if not set on command line)
578 -Wpen Use the new pen and turn outline on
579 -W- Turn outline off
580 -W+ Revert to default pen (none if not set on command line)
581 -Zzval Obtain fill via cpt lookup using z-value zval
582 -ZNaN Get the NaN color from the cpt file
583
584 SPECIFYING PENS
585 pen The attributes of lines and symbol outlines as defined by pen is
586 a comma delimetered list of width, color and texture, each of
587 which is optional. width can be indicated as a measure (points,
588 centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
589 fat[ter|test], or obese. color specifies a gray shade or color
590 (see SPECIFYING COLOR below). texture is a combination of
591 dashes `-' and dots `.'.
592
593 SPECIFYING FILL
594 fill The attribute fill specifies the solid shade or solid color (see
595 SPECIFYING COLOR below) or the pattern used for filling poly‐
596 gons. Patterns are specified as pdpi/pattern, where pattern
597 gives the number of the built-in pattern (1-90) or the name of a
598 Sun 1-, 8-, or 24-bit raster file. The dpi sets the resolution
599 of the image. For 1-bit rasters: use Pdpi/pattern for inverse
600 video, or append :Fcolor[B[color]] to specify fore- and back‐
601 ground colors (use color = - for transparency). See GMT Cook‐
602 book & Technical Reference Appendix E for information on indi‐
603 vidual patterns.
604
605 SPECIFYING COLOR
606 color The color of lines, areas and patterns can be specified by a
607 valid color name; by a gray shade (in the range 0-255); by a
608 decimal color code (r/g/b, each in range 0-255; h-s-v, ranges
609 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexa‐
610 decimal color code (#rrggbb, as used in HTML). See the gmtcol‐
611 ors manpage for more information and a full list of color names.
612
614 To plot solid red circles (diameter = 0.25 cm) at the positions listed
615 in the file DSDP.xy on a Mercator map at 5 cm/degree of the area 150E
616 to 154E, 18N to 23N, with tickmarks every 1 degree and gridlines every
617 15 minutes, use
618
619 psxy DSDP.xy -R150/154/18/23 -Jm5c -Sc0.25c -Gred -B1g15m | lpr
620
621 To plot the xyz values in the file quakes.xyzm as circles with size
622 given by the magnitude in the 4th column and color based on the depth
623 in the third using the color palette cpt on a linear map, use
624
625 psxy quakes.xyzm -R0/1000/0/1000 -JX6i -Sc -Ccpt -B200 > map.ps
626
627 To plot the file trench.xy on a Mercator map, with white triangles with
628 sides 0.25 inch on the left side of the line, spaced every 0.8 inch,
629 use
630
631 psxy trench.xy -R150/200/20/50 -Jm0.15i -Sf0.8i/0.1ilt -Gwhite -W -B10
632 | lpr br
633
634 To plot the data in the file misc.d as symbols determined by the code
635 in the last column, and with size given by the magnitude in the 4th
636 column, and color based on the third column via the color palette cpt
637 on a linear map, use
638
639 psxy misc.d -R0/100/-50/100 -JX6i -S -Ccpt -B20 > t.ps
640
642 psxy and psxyz allows users to define and plot their own custom sym‐
643 bols. This is done by encoding the symbol using a simple plotting code
644 described below. Put all the plotting codes for your new symbol in a
645 file whose extension must be .def; you may then address the symbol
646 without giving the extension (e.g., the symbol file tsunami.def is used
647 by specifying -Sktsunami/size. The definition file can contain any
648 number of plot code records, as well as blank lines and comment lines
649 (starting with #). psxy and psxyz will look for the definition files
650 in (1) the current directory, (2) the ~/.gmt directory, and (3) the
651 $GMT_SHAREDIR/custom directory, in that order. Freeform polygons (made
652 up of straight line segments and arcs of circles) can be designed -
653 these polygons can be painted and filled with a pattern. Other stan‐
654 dard geometric symbols can also be used. Generate freeform polygons by
655 starting with an anchor point (append [ -Wpen ] and [ -Gfill ] to indi‐
656 cate pen and fill attributes):
657 x0 y0 M
658 and draw a straight line from the current point to the next point with
659 x y D
660 or add an arc by using
661 xc yc r dir1 dir2 A
662 When a record other than the D or A is encountered, the polygon is
663 closed and considered complete. The optional pen and fill setting
664 hardwires particular values for this feature. If not present the poly‐
665 gon's characteristics are determined by the command line settings for
666 pen and fill. To deactivate fill or outline for any given polygon,
667 give -G- or -W-. To add other geometric shapes to your custom symbol,
668 add any number of the following plot code records (each accepts the
669 optional [ -Wpen ] and [ -Gfill ] at the end):
670
671 circle: x y size c
672 cross: x y size x
673 diamond: x y size d
674 ellipse: x y dir major minor e
675 hexagon: x y size h
676 invtriangle: x y size i
677 letter: x y size string l
678 octagon: x y size g
679 pentagon: x y size n
680 plus: x y size +
681 rect: x y xwidth ywidth r
682 square: x y size s
683 star: x y size a
684 triangle: x y size t
685 wedge: x y radius dir1 dir2 w
686 x-dash: x y size -
687 y-dash: x y size y
688
689 When designing your symbol, the x, y and other dimensions are relative
690 to a symbol of size 1, and all the dimensions will be scaled by the
691 actual symbol size chosen at run-time. To design a symbol, make a grid
692 paper with psbasemap -R-0.5/0.5/-0.5/0.5 -JX4i -Ba0.1g0.05 -P > grid.ps
693 and draw your symbol, centering it on (0,0). For examples of symbols,
694 see the set supplied with GMT in $GMT_SHAREDIR/custom.
695
697 The -N option does not adjust the BoundingBox information so you may
698 have to post-process the PostScript output with ps2raster -A to obtain
699 the correct BoundingBox.
700 psxy cannot handle filling of polygons that contain the south or north
701 pole. For such a polygon, make a copy and split it into two and make
702 each explicitly contain the polar point. The two polygons will combine
703 to give the desired effect when filled; to draw outline use the origi‐
704 nal polygon.
705
707 GMT(1), gmtcolors(5), psbasemap(1), psxyz(1)
708
709
710
711GMT 4.5.6 10 Mar 2011 PSXY(1)