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