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