pswiggle — GMT 5.1.1 documentation

### Navigation

- index
- next
- previous
- Project Home »
- GMT 5.1.1 documentation »
- PS »
- Search:

# pswiggle

pswiggle - Plot z = f(x,y) anomalies along tracks

## Synopsis

pswiggle [ table ] -Jparameters -Rwest/east/south/north[/zmin/zmax][r] [ -Zscale [ -Aazimuth ] [ -B[p|s]parameters ] [ -Ccenter ] [ -G[+|-|=]fill ] [ -Jz|Zparameters ] [ -Ifix_az ] [ -K ] [ -O ] [ -P ] [ -S[x]lon0/lat0/length[/units] ] [ -Tpen ] [ -U[just/dx/dy/][c|label] ] [ -V[level] ] [ -Wpen ] [ [ -X[a|c|f|r][x-shift[u]] ] [ -Y[a|c|f|r][y-shift[u]] ] [ -bi[ncols][type][w][+L|+B] ] [ -ccopies ] [ -f[i|o]colinfo ] [ -g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] ] [ -h[i|o][n][+c][+d][+rremark][+rtitle] ] [ -icols[l][sscale][ooffset][,...] ] [ -p[x|y|z]azim/elev[/zlevel][+wlon0/lat0[/z0]][+vx0/y0] ] [ -t[transp] ] [ -:[i|o] ]

Note: No space is allowed between the option flag and the associated arguments.

## Description

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. 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.

## Required Arguments

-Jparameters (more ...)
  Select map projection.

-R[unit]xmin/xmax/ymin/ymax[r] (more ...)
  Specify the region of interest.

For perspective view p, optionally append /zmin/zmax. (more ...)

-Zscale
  Gives anomaly scale in data-units/distance-unit.

## Optional Arguments

table
  One or more ASCII (or binary, see -bi[ncols][type]) data table file(s) holding a number of data columns. If no tables are given then we read from standard input.
-Aazimuth
  Sets the preferred positive azimuth. Positive wiggles will “gravitate” towards that direction.

-B[p|s]parameters (more ...)
  Set map boundary intervals.
-Ccenter
  Subtract center from the data set before plotting [0].
-G[+|-|=]fill
  Set fill shade, color or pattern for positive and/or negative wiggles [Default is no fill]. Optionally, prepend + to fill positive areas (this is the default behavior). Prepend - to fill negative areas. Prepend = to fill both positive and negative areas with the same fill.
-Ifix_az
  Set a fixed azimuth projection for wiggles [Default uses track azimuth, but see -A].

-Jz|Zparameters (more ...)
  Set z-axis scaling; same syntax as -Jx.

-K (more ...)
  Do not finalize the PostScript plot.

-O (more ...)
  Append to existing PostScript plot.

-P (more ...)
  Select “Portrait” plot orientation.
-S[x]lon0/lat0/length[/units]
  Draws a simple vertical scale centered on lon0/lat0. Use -Sx to specify cartesian coordinates instead. length is in z units, append unit name for labeling. FONT_ANNOT_PRIMARY is used as font.
-Tpen
  Draw track [Default is no track]. Append pen attributes to use [Defaults: width = 0.25p, color = black, style = solid].

-U[just/dx/dy/][c|label] (more ...)
  Draw GMT time stamp logo on plot.

-V[level] (more ...)
  Select verbosity level [c].

-Wpen

-bi[ncols][type] (more ...)
  Select binary input. [Default is 3 input columns].

-ccopies (more ...)
  Specify number of plot copies [Default is 1].

-f[i|o]colinfo (more ...)
  Specify data types of input and/or output columns.

-g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] (more ...)
  Determine data gaps and line breaks.

-h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
  Skip or produce header record(s).

-icols[l][sscale][ooffset][,...] (more ...)
  Select input columns.

-p[x|y|z]azim/elev[/zlevel][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
  Select perspective view.

-t[transp] (more ...)
  Set PDF transparency level in percent.

-:[i|o] (more ...)
  Swap 1st and 2nd column on input and/or output.

-^
  Print a short message about the syntax of the command, then exits (NOTE: on Windows use just -).
+
  Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exits.
-?
  Print a complete usage (help) message, including the explanation of options, then exits.
--version
  Print GMT version and exit.
--show-datadir
  Print full path to GMT share directory and exit.

## Examples

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

## Bugs

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

and plot this data set instead.

## See Also

gmt, gmtcolors, filter1d, psbasemap, splitxyz

### Navigation

- index
- next
- previous
- Project Home »
- GMT 5.1.1 documentation »
- PS »
- Search: