NAME

       pswiggle - Plot anomaly along track on a map


SYNOPSIS

       pswiggle  xyz_files  -Jparameters  -Rwest/east/south/north[r] -Zscale [
       -Aazimuth ] [ -Btickinfo ] [ -Ccenter ] [ -Dgap ] [ -Eazimuth/elevation
       ]  [ -Gfillrgb ] [ -H[nrec] ] [ -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 ] [ -: ] [ -bi[s][n] ] [ -f[i|o]colinfo ]


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 con-
       secutive (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 direc-
       tion, 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.

       files  List one or more file-names. If no  files  are  given,  pswiggle
              will read standard input.

       -J     Selects  the  map  projection. Scale is UNIT/degree, 1:xxxxx, or
              width in UNIT (upper case modifier).  UNIT is cm,  inch,  or  m,
              depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
              can be overridden on the command line by appending c, i, or m to
              the  scale/width  value.   For map height, max dimension, or min
              dimension, append h, +, or - to the width, respectively.

              CYLINDRICAL PROJECTIONS:

              -Jclon0/lat0/scale (Cassini)
              -Jjlon0/scale (Miller)
              -Jmscale (Mercator - Greenwich and Equator as origin)
              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral-
              lel)
              -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 Car-
              ree))
              -Jtlon0/scale (TM - Transverse Mercator, with Equator as y = 0)
              -Jtlon0/lat0/scale (TM - Transverse Mercator, set origin)
              -Juzone/scale (UTM - Universal Transverse Mercator)
              -Jylon0/lats/scale (Basic Cylindrical Projection)

              AZIMUTHAL PROJECTIONS:

              -Jalon0/lat0/scale (Lambert).
              -Jelon0/lat0/scale (Equidistant).
              -Jflon0/lat0/horizon/scale (Gnomonic).
              -Jglon0/lat0/scale (Orthographic).
              -Jslon0/lat0/[slat/]scale (General Stereographic)

              CONIC PROJECTIONS:

              -Jblon0/lat0/lat1/lat2/scale (Albers)
              -Jdlon0/lat0/lat1/lat2/scale (Equidistant)
              -Jllon0/lat0/lat1/lat2/scale (Lambert)

              MISCELLANEOUS PROJECTIONS:

              -Jhlon0/scale (Hammer)
              -Jilon0/scale (Sinusoidal)
              -Jk[f|s]lon0/scale (Eckert IV (f) and VI (s))
              -Jnlon0/scale (Robinson)
              -Jrlon0/scale (Winkel Tripel)
              -Jvlon0/scale (Van der Grinten)
              -Jwlon0/scale (Mollweide)

              NON-GEOGRAPHICAL PROJECTIONS:

              -Jp[a]scale[/origin] (polar (theta,r)  coordinates,  optional  a
              for azimuths and offset theta [0])
              -Jxx-scale[l|ppow][/y-scale[l|ppow]][d]  (Linear, log, and power
              scaling)
              More details can be found in the psbasemap man pages.

       -R     xmin, xmax, ymin, and ymax specify the Region of  interest.  For
              geographic  regions,  these  limits  correspond  to  west, east,
              south, and north and you may specify them in decimal degrees  or
              in  [+-]dd:mm[:ss.xxx][W|E|S|N]  format.  Append r if lower left
              and upper right map coordinates are given instead of  wesn.  The
              two  shorthands  -Rg  -Rd  stand  for  global  domain  (0/360 or
              -180/+180 in longitude respectively, with -90/+90 in  latitude).
              For  calendar time coordinates you may either give relative time
              (relative  to  the  selected  TIME_EPOCH  and  in  the  selected
              TIME_UNIT;  append  t  to  -JX|x),  or absolute time of the form
              [date]T[clock] (append T to -JX|x). At least  one  of  date  and
              clock must be present; the T is always required. The date string
              must be of the form [-]yyyy[-mm[-dd]]  (Gregorian  calendar)  or
              yyyy[-Www[-d]]  (ISO week calendar), while the clock string must
              be of the form hh:mm:ss[.xxx]. The use of delimiters  and  their
              type  and  positions must be as indicated (however, input/output
              and plotting formats are flexible).

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


OPTIONS

       No space between the option flag and the associated arguments.

       -A     Sets the  preferred  positive  azimuth.  Positive  wiggles  will
              "gravitate" towards that direction.

       -B     Sets  map  boundary  annotation  and tickmark intervals; see the
              psbasemap man page for all the 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].

       -G     Set fill of positive wiggles. [Default  is  black]  Specify  the
              shade  (0-255)  or color (r/g/b, each in 0-255, h/s/v, with h in
              0-360, s, and v in 0-1, and set COLOR_MODEL = hsv,  or  c/m/y/k,
              each  in 0-100 %).  Alternatively, specify -Gpdpi/pattern, where
              pattern gives the number of the built-in pattern (1-90)  or  the
              name  of  a  Sun 1-, 8-, or 24-bit raster file. The dpi sets the
              resolution of the image. For 1-bit rasters: use -GP for  inverse
              video,   or   append  :Fr/g/b[B[r/g/b]]  to  specify  fore-  and
              background colors (use r/g/b = -  for  transparency).   See  GMT
              Cookbook  &  Technical  Reference  Appendix E for information on
              individual patterns.

       -H     Input file(s) has Header record(s). Number of header records can
              be  changed  by  editing  your  .gmtdefaults4 file. If used, GMT
              default is 1 header record. Use -Hi if only  input  data  should
              have  header  records  [Default will write out header records if
              the input data have them].

       -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 sys-
              tem].

       -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 attributes to use
              [Defaults: width = 1, color = 0/0/0, texture = 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. Optionally, append a label,  or  c
              (which  will  plot  the  command  string.).  The  GMT parameters
              UNIX_TIME and UNIX_TIME_POS can affect the appearance;  see  the
              gmtdefaults man page for details.

       -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).  Prepend a for  abso-
              lute  coordinates; the default (r) will reset plot origin.  Give
              c to center plot using current page size.

       -:     Toggles between  (longitude,latitude)  and  (latitude,longitude)
              input  and/or output. [Default is (longitude,latitude)].  Append
              i to select input only or o  to  select  output  only.  [Default
              affects both].

       -bi    Selects  binary input. Append s for single precision [Default is
              double].  Append n for the  number  of  columns  in  the  binary
              file(s).
              [Default is 3 input columns].

       -c     Specifies the number of plot copies. [Default is 1].

       -f     Special  formatting  of  input  and output columns (time or geo-
              graphical data) Specify i(nput) or  o(utput)  [Default  is  both
              input  and output].  Give one or more columns (or column ranges)
              separated by commas.  Append T (Absolute calendar time), t (time
              relative  to  chosen TIME_EPOCH), x (longitude), y (latitude), g
              (geographic coordinate), or f (floating point) to each column or
              column range item.


EXAMPLES

       To plot the magnetic anomaly stored in the file track.xym along track @
       1000 nTesla/cm (after removing a mean value of 32000 Tesla), 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

       pswiggle track.xym -R-20/10/-80/-60 -JS0/90/15c -Z1000 -B5 -P -G255/0/0
       -T0.25p/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(l), filter1d(l), psbasemap(l), splitxyz(l)



GMT4.0                            1 Oct 2004                       PSWIGGLE(l)

Man(1) output converted with man2html