PSWIGGLE(1gmt) | GMT | PSWIGGLE(1gmt) |
pswiggle - Plot z = f(x,y) anomalies along tracks
pswiggle [ table ] -Jparameters -Rwest/east/south/north[/zmin/zmax][+r] -Zscale[units] [ |-A|[*azimuth] ] [ -B[p|s]parameters ] [ -Ccenter ] [ -G[+|-|=]fill ] [ -Ifix_az ] [ -K ] [ -O ] [ -P ] [ -S[x]lon0/lat0/length[/units] ] [ -Tpen ] [ -U[stamp] ] [ -V[level] ] [ -Wpen ] [ -Xx_offset ] [ -Yy_offset ] [ -bibinary ] [ -dinodata ] [ -eregexp ] [ -fflags ] [ -ggaps ] [ -hheaders ] [ -iflags ] [ -pflags ] [ -ttransp ] [ -:[i|o] ]
Note: No space is allowed between the option flag and the associated arguments.
pswiggle reads (x,y,z) triplets from files [or standard input] and plots z as a function of distance along track. This means that two consecutive (x,y) points define the local distance axis, and the local z axis is then perpendicular to the distance axis, forming a right-handed coordinate system. The user may set a preferred positive anomaly plot direction, and if the positive normal is outside the plus/minus 90 degree window around the preferred direction, then 180 degrees are added to the direction. Either the positive or the negative wiggle may be shaded. The resulting PostScript code is written to standard output.
For perspective view p, optionally append /zmin/zmax. (more ...)
-Wpen
To plot the magnetic anomaly stored in the file track.xym along track @ 1000 nTesla/cm (after removing a mean value of 32000 nTesla), using a 15-cm-wide Polar Stereographic map ticked every 5 degrees in Portrait mode, with positive anomalies in red on a blue track of width 0.25 points, use
gmt pswiggle track.xym -R-20/10/-80/-60 -JS0/90/15c -Z1000 -B5 \
-C32000 -P -Gred -T0.25p,blue -S1000 -V > track_xym.ps
and the positive anomalies will in general point in the north direction. To instead enforce a fixed azimuth of 45 for the positive wiggles, we add -I and obtain
gmt pswiggle track.xym -R-20/10/-80/-60 -JS0/90/15c -Z1000 -B5 \
-C32000 -P -Gred -I45 -T0.25p,blue -S1000 -V > track_xym.ps
Sometimes the (x,y) coordinates are not printed with enough significant digits, so the local perpendicular to the track swings around a lot. To see if this is the problem, you should do this:
awk '{ if (NR > 1) print atan2(y-$1, x-$2); y=$1; x=$2; }' yourdata.xyz | more
(note that output is in radians; on some machines you need "nawk" to do this). Then if these numbers jump around a lot, you may do this:
awk '{ print NR, $0 }' yourdata.xyz | filter1d -Fb5 -N4/0 \ --FORMAT_FLOAT_OUT=%.12g > smoothed.xyz
which performs a 5-point boxcar filter, and plot this data set instead.
gmt, gmtcolors, filter1d, psbasemap, splitxyz
2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
May 21, 2019 | 5.4.5 |