1PSWIGGLE(1) Generic Mapping Tools PSWIGGLE(1)
2
3
4
6 pswiggle - Plot anomaly along track on a map
7
9 pswiggle xyz_files -Jparameters -Rwest/east/south/north[r] -Zscale [
10 -Aazimuth ] [ -B[p|s]parameters ] [ -Ccenter ] [ -Dgap ] [ -Eaz‐
11 imuth/elevation ] [ -Gfill ] [ -H[i][nrec] ] [ -Jz|Zparameters ] [
12 -Ifix_az ] [ -K ] [ -M[flag] ] [ -N ] [ -O ] [ -P ] [
13 -S[x]lon0/lat0/length[units] ] [ -Tpen ] [ -U[just/dx/dy/][c|label] ] [
14 -V ] [ -Wpen ] [ -X[a|c|r][x-shift[u]] ] [ -Y[a|c|r][y-shift[u]] ] [
15 -ccopies ] [ -:[i|o] ] [ -bi[s|S|d|D[ncol]|c[var1/...]] ] [ -fcolinfo ]
16
18 pswiggle reads (x,y,z) triplets from files [or standard input] and
19 plots z as a function of distance along track. This means that two
20 consecutive (x,y) points define the local distance axis, and the local
21 z axis is then perpendicular to the distance axis. The user may set a
22 preferred positive anomaly plot direction, and if the positive normal
23 is outside the plus/minus 90 degree window around the preferred direc‐
24 tion, then 180 degrees are added to the direction. Either the positive
25 or the negative wiggle may be shaded. The resulting PostScript code is
26 written to standard output.
27
28 files List one or more file-names. If no files are given, pswiggle
29 will read standard input.
30
31 -J Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or
32 width in UNIT (upper case modifier). UNIT is cm, inch, or m,
33 depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
34 can be overridden on the command line by appending c, i, or m to
35 the scale/width value. When central meridian is optional,
36 default is center of longitude range on -R option. Default
37 standard parallel is the equator. For map height, max dimen‐
38 sion, or min dimension, append h, +, or - to the width, respec‐
39 tively.
40 More details can be found in the psbasemap man pages.
41
42 CYLINDRICAL PROJECTIONS:
43
44 -Jclon0/lat0/scale (Cassini)
45 -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
46 -Jj[lon0/]scale (Miller)
47 -Jm[lon0/[lat0/]]scale (Mercator)
48 -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
49 lel)
50 -Jo[a]lon0/lat0/azimuth/scale (Oblique Mercator - point and
51 azimuth)
52 -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
53 -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and
54 pole)
55 -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
56 -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
57 -Juzone/scale (UTM - Universal Transverse Mercator)
58 -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
59
60 CONIC PROJECTIONS:
61
62 -Jblon0/lat0/lat1/lat2/scale (Albers)
63 -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
64 -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
65
66 AZIMUTHAL PROJECTIONS:
67
68 -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
69 -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
70 -Jflon0/lat0[/horizon]/scale (Gnomonic)
71 -Jglon0/lat0[/horizon]/scale (Orthographic)
72 -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
73 (General Perspective).
74 -Jslon0/lat0[/horizon][/slat]/scale (General Stereographic)
75
76 MISCELLANEOUS PROJECTIONS:
77
78 -Jh[lon0/]scale (Hammer)
79 -Ji[lon0/]scale (Sinusoidal)
80 -Jkf[lon0/]scale (Eckert IV)
81 -Jk[s][lon0/]scale (Eckert IV)
82 -Jn[lon0/]scale (Robinson)
83 -Jr[lon0/]scale (Winkel Tripel)
84 -Jv[lon0/]scale (Van der Grinten)
85 -Jw[lon0/]scale (Mollweide)
86
87 NON-GEOGRAPHICAL PROJECTIONS:
88
89 -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
90 -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]] (Linear, log,
91 and power scaling)
92
93 -R xmin, xmax, ymin, and ymax specify the Region of interest. For
94 geographic regions, these limits correspond to west, east,
95 south, and north and you may specify them in decimal degrees or
96 in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left
97 and upper right map coordinates are given instead of w/e/s/n.
98 The two shorthands -Rg and -Rd stand for global domain (0/360
99 and -180/+180 in longitude respectively, with -90/+90 in lati‐
100 tude). For calendar time coordinates you may either give (a)
101 relative time (relative to the selected TIME_EPOCH and in the
102 selected TIME_UNIT; append t to -JX|x), or (b) absolute time of
103 the form [date]T[clock] (append T to -JX|x). At least one of
104 date and clock must be present; the T is always required. The
105 date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
106 calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
107 string must be of the form hh:mm:ss[.xxx]. The use of delim‐
108 iters and their type and positions must be exactly as indicated
109 (however, input, output and plot formats are customizable; see
110 gmtdefaults).
111
112 -Z Gives anomaly scale in data-units/distance-unit.
113
115 No space between the option flag and the associated arguments.
116
117 -A Sets the preferred positive azimuth. Positive wiggles will
118 "gravitate" towards that direction.
119
120 -B Sets map boundary annotation and tickmark intervals; see the
121 psbasemap man page for all the details.
122
123 -C Subtract center from the data set before plotting [0].
124
125 -D Means there is a data gap if 2 consecutive points are more than
126 gap distance units apart. For longitude/latitude data gap is in
127 km, else it is in the user's units.
128
129 -E Sets the viewpoint's azimuth and elevation [180/90].
130
131 -G Set fill shade, color or pattern of positive wiggles [Default is
132 black] (See SPECIFYING FILL below).
133
134 -H Input file(s) has Header record(s). Number of header records
135 can be changed by editing your .gmtdefaults4 file. If used, GMT
136 default is 1 header record. Use -Hi if only input data should
137 have header records [Default will write out header records if
138 the input data have them]. Blank lines and lines starting with #
139 are always skipped.
140
141 -I Set a fixed azimuth projection for wiggles [Default uses track
142 azimuth, but see -A].
143
144 -K More PostScript code will be appended later [Default terminates
145 the plot system].
146
147 -M Multiple segment file. Segments are separated by a record whose
148 first character is flag. [Default is '>'].
149
150 -N Paint negative wiggles instead of positive [Default].
151
152 -O Selects Overlay plot mode [Default initializes a new plot sys‐
153 tem].
154
155 -P Selects Portrait plotting mode [Default is Landscape, see gmtde‐
156 faults to change this].
157
158 -S Draws a simple vertical scale centered on lon0/lat0. Use -Sx to
159 specify cartesian coordinates instead. length is in z units,
160 append unit name for labeling
161
162 -T Draw track [Default is no track]. Append pen attributes to use
163 [Defaults: width = 1, color = black, texture = solid]. (See
164 SPECIFYING PENS below).
165
166 -U Draw Unix System time stamp on plot. By adding just/dx/dy/, the
167 user may specify the justification of the stamp and where the
168 stamp should fall on the page relative to lower left corner of
169 the plot. For example, BL/0/0 will align the lower left corner
170 of the time stamp with the lower left corner of the plot.
171 Optionally, append a label, or c (which will plot the command
172 string.). The GMT parameters UNIX_TIME, UNIX_TIME_POS, and
173 UNIX_TIME_FORMAT can affect the appearance; see the gmtdefaults
174 man page for details. The time string will be in the locale set
175 by the environment variable TZ (generally local time).
176
177 -V Selects verbose mode, which will send progress reports to stderr
178 [Default runs "silently"].
179
180 -W Draw wiggle outline [Default is no outline]. Append pen
181 attributes to use [Defaults: width = 1, color = black, texture =
182 solid]. (See SPECIFYING PENS below).
183
184 -X -Y Shift plot origin relative to the current origin by (x-shift,y-
185 shift) and optionally append the length unit (c, i, m, p). You
186 can prepend a to shift the origin back to the original position
187 after plotting, or prepend r [Default] to reset the current
188 origin to the new location. If -O is used then the default (x-
189 shift,y-shift) is (0,0), otherwise it is (r1i, r1i) or (r2.5c,
190 r2.5c). Alternatively, give c to align the center coordinate (x
191 or y) of the plot with the center of the page based on current
192 page size.
193
194 -: Toggles between (longitude,latitude) and (latitude,longitude)
195 input and/or output. [Default is (longitude,latitude)]. Append
196 i to select input only or o to select output only. [Default
197 affects both].
198
199 -bi Selects binary input. Append s for single precision [Default is
200 d (double)]. Uppercase S or D will force byte-swapping.
201 Optionally, append ncol, the number of columns in your binary
202 input file if it exceeds the columns needed by the program. Or
203 append c if the input file is netCDF. Optionally, append
204 var1/var2/... to specify the variables to be read. [Default is
205 3 input columns].
206
207 -c Specifies the number of plot copies. [Default is 1].
208
209 -f Special formatting of input and/or output columns (time or geo‐
210 graphical data). Specify i or o to make this apply only to
211 input or output [Default applies to both]. Give one or more
212 columns (or column ranges) separated by commas. Append T (abso‐
213 lute calendar time), t (relative time in chosen TIME_UNIT since
214 TIME_EPOCH), x (longitude), y (latitude), or f (floating point)
215 to each column or column range item. Shorthand -f[i|o]g means
216 -f[i|o]0x,1y (geographic coordinates).
217
218 SPECIFYING PENS
219 pen The attributes of lines and symbol outlines as defined by pen is
220 a comma delimetered list of width, color and texture, each of
221 which is optional. width can be indicated as a measure (points,
222 centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
223 fat[ter|test], or obese. color specifies a grey shade or color
224 (see SPECIFYING COLOR below). texture is a combination of
225 dashes `-' and dots `.'.
226
227 SPECIFYING FILL
228 fill The attribute fill specifies the solid shade or solid color (see
229 SPECIFYING COLOR below) or the pattern used for filling poly‐
230 gons. Patterns are specified as pdpi/pattern, where pattern
231 gives the number of the built-in pattern (1-90) or the name of a
232 Sun 1-, 8-, or 24-bit raster file. The dpi sets the resolution
233 of the image. For 1-bit rasters: use Pdpi/pattern for inverse
234 video, or append :Fcolor[B[color]] to specify fore- and back‐
235 ground colors (use color = - for transparency). See GMT Cook‐
236 book & Technical Reference Appendix E for information on indi‐
237 vidual patterns.
238
239 SPECIFYING COLOR
240 color The color of lines, areas and patterns can be specified by a
241 valid color name; by a grey shade (in the range 0-255); by a
242 decimal color code (r/g/b, each in range 0-255; h-s-v, ranges
243 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexa‐
244 decimal color code (#rrggbb, as used in HTML). See the gmtcol‐
245 ors manpage for more information and a full list of color names.
246
248 To plot the magnetic anomaly stored in the file track.xym along track @
249 1000 nTesla/cm (after removing a mean value of 32000 Tesla), using a
250 15-cm-wide Polar Stereographic map ticked every 5 degrees in Portrait
251 mode, with positive anomalies in red on a blue track of width 0.25
252 points, use
253
254 pswiggle track.xym -R-20/10/-80/-60 -JS0/90/15c -Z1000 -B5 -P -Gred
255 -T0.25p,blue -S1000 -V > track_xym.ps
256
258 Sometimes the (x,y) coordinates are not printed with enough significant
259 digits, so the local perpendicular to the track swings around a lot.
260 To see if this is the problem, you should do this:
261
262 awk '{ if (NR > 1) print atan2(y-$1, x-$2); y=$1; x=$2; }' yourdata.xyz
263 | more
264
265 (note that output is in radians; on some machines you need "nawk" to do
266 this). Then if these numbers jump around a lot, you may do this:
267
268 awk '{ print NR, $0 }' yourdata.xyz | filter1d -Fb5 -N4/0 --D_FOR‐
269 MAT=%.12lg > smoothed.xyz
270
271 and plot this data set instead.
272
274 GMT(1), filter1d(1), psbasemap(1), splitxyz(1)
275
276
277
278GMT 4.3.1 15 May 2008 PSWIGGLE(1)