NAME
pswiggle - Plot anomaly along track on a map
SYNOPSIS
pswiggle xyz_files -Jparameters -Rwest/east/south/north[r] -
Zscale [ -Adirection ] [ -Btickinfo ] [ -Ccenter ] [ -Dgap ]
[ -Eazimuth/elevation ] [ -Fred/green/blue ] [ -Gfillrgb ] [
-H ] [ -Ifix_az ] [ -K ] [ -M[flag] ] [ -N ] [ -O ] [ -P ] [
- S[x]lon0/lat0/length[units] ] [ - Ttrack_pen ] [ -
U[/dx/dy/][label] ] [ -V ] [ -Wwiggle_pen ] [ -Xx-shift ] [
-Yy-shift ] [ -ccopies ] [ -: ]
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 perpendic-
ular 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 pre-
ferred direction, then 180 degrees are added to the direc-
tion. Either the positive or the negative wiggle may be
shaded. The resulting PostScript code is written to stan-
dard output.
files
List one or more file-names. If no files are given,
psxy will read standard input.
-J Selects the map projection. Scale is inch/degree,
1:xxxxx. or width in inch (upper case modifier).
CYLINDRICAL PROJECTIONS:
-Jclon0/lat0/scale (Cassini)
-Jmscale (Mercator - Greenwich and Equator as origin)
-Jmlon0/lat0/scale (Mercator - Give meridian and stan-
dard parallel)
-Joalon0/lat0/azimuth/scale (Oblique Mercator - point
and azimuth)
-Joblon0/lat0/lon1/lat1/scale (Oblique Mercator - two
points)
-Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point
and pole)
- Jqlon0/scale (Equidistant Cylindrical Projection
(Plate Carree))
-Jtlon0/scale (TM - Transverse Mercator)
-Juzone/scale (UTM - Universal Transverse Mercator)
-Jylon0/lats/scale (Basic Cylindrical Projection)
AZIMUTHAL PROJECTIONS:
-Jalon0/lat0/scale (Lambert).
-Jelon0/lat0/scale (Equidistant).
-Jglon0/lat0/scale (Orthographic).
-Jslon0/lat0/scale (General Stereographic)
CONIC PROJECTIONS:
-Jblon0/lat0/lat1/lat2/scale (Albers)
-Jllon0/lat0/lat1/lat2/scale (Lambert)
MISCELLANEOUS PROJECTIONS:
-Jhlon0/scale (Hammer)
-Jilon0/scale (Sinusoidal)
-Jklon0/scale (Eckert VI)
-Jnlon0/scale (Robinson)
-Jrlon0/scale (Winkel Tripel)
-Jwlon0/scale (Mollweide)
NON-GEOGRAPHICAL PROJECTIONS:
-Jpscale (Linear projection for polar (theta,r) coordi-
nates)
-Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log, and
power scaling)
More details can be found in the psbasemap manpages.
-R west, east, south, and north specify the Region of
interest. To specify boundaries in degrees and minutes
[and seconds], use the dd:mm[:ss] format. Append r if
lower left and upper right map coordinates are given
instead of wesn.
-Z Gives anomaly scale in data-units/inch.
OPTIONS
No space between the option flag and the associated argu-
ments.
-A Sets the preferred positive direction. Positive wig-
gles will "gravitate" towards that direction.
-B Sets map boundary tickmark intervals. See psbasemap
for details.
-C Subtract center from the data set before plotting [0].
-D Means there is a data gap if 2 consecutive points are
more than gap distance units apart. For
longitude/latitude data gap is in km, else it is in the
user's units.
-E Sets the viewpoint's azimuth and elevation [180/90]
-F Sets the color used for Frame and annotation. [Default
is 0/0/0 (black)]
-G Gray shade or color for filling of positive anomalies.
Grayshade range from 0 (black) to 255 (white). Color
range from 0-255 for each of the rgb components.
[Default is black]
-H Input file(s) has Header record(s). Number of header
records can be changed by editing your .gmtdefaults
file. If used, GMT default is 1 header record.
-I Set a fixed azimuth projection for wiggles [Default
uses track azimuth, but see -A].
-K More PostScript code will be appended later [Default
terminates the plot system].
-M Multiple segment file. Segments are separated by a
record whose first character is flag. [Default is
'>'].
-N Paint negative wiggles instead of positive [Default].
-O Selects Overlay plot mode [Default initializes a new
plot system].
- P Selects Portrait plotting mode [GMT Default is
Landscape, see gmtdefaults to change this].
-S 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
-T Draw track [Default is no track]. Append pen attri-
butes to use [Defaults: width = 1, color = 0/0/0, tex-
ture = solid].
-U Draw Unix System time stamp on plot. User may specify
where the lower left corner of the stamp should fall on
the page relative to lower left corner of plot in inch
[Default is (-0.75,-0.75)]. Optionally, append a
label, or c (which will plot the command string.)
-V Selects verbose mode, which will send progress reports
to stderr [Default runs "silently"].
-W Draw wiggle outline [Default is no outline]. Append
pen attributes to use [Defaults: width = 1, color =
0/0/0, texture = solid].
-X -Y
Shift origin of plot by (x-shift,y-shift) inch
[Default is (1,1) for new plots, (0,0) for overlays].
- : Toggles between (longitude,latitude) and
(latitude,longitude) input/output. [Default is
(longitude,latitude)]
-c Specifies the number of plot copies. [Default is 1]
EXAMPLES
To plot the magnetic anomaly stored in the file track.xym
along track @ 1000 nTesla/inch (after removing a mean value
of 32000 Tesla), using a 5-inch-wide Polar Stereographic map
ticked every 5 degrees in Portrait mode, with positive
anomalies in red on a blue track of width 1, try
pswiggle track.xym -R-20/10/-80/-60 -JP0/90/5 -Z1000 -B5 - P
-G255/0/0 -T1/0/0/255 -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:
gmtset D_FORMAT %.12lg
awk '{ print NR, $0 }' yourdata.xyz | filter1d -Fb5 -N4/0 >
smoothed.xyz
and plot this data set instead.
SEE ALSO
gmt, filter1d, psbasemap, splitxyz
REFERENCES
Wessel, P., and W. H. F. Smith, 1995, The Generic Mapping
Tools (GMT) version 3.0 Technical Reference & Cookbook,
SOEST/NOAA.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released,
http://www.agu.org/eos_elec/95154e.html, Copyright 1995 by
the American Geophysical Union.
Wessel, P., and W. H. F. Smith, 1991, Free Software Helps
Map and Display Data, EOS Trans. AGU, 72, p. 441.