.TH PSWIGGLE 1gmt "15 Jul 2011" "GMT 4.5.7" "Generic Mapping Tools" .SH NAME pswiggle \- Plot anomaly along track on a map .SH SYNOPSIS \fBpswiggle\fP \fIxyz_files\fP \fB\-J\fP\fIparameters\fP \fB\-R\fP\fIwest\fP/\fIeast\fP/\fIsouth\fP/\fInorth\fP[\fBr\fP] \fB\-Z\fP\fIscale\fP [ \fB\-A\fP\fIazimuth\fP ] [ \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP ] [ \fB\-C\fP\fIcenter\fP ] [ \fB\-D\fP[\fBx\fP]\fIgap\fP ] [ \fB\-E\fP\fIazim\fP/\fIelev\fP[\fB+w\fP\fIlon\fP/\fIlat\fP[/\fIz\fP]][\fB+v\fP\fIx0\fP/\fIy0\fP] ] [ \fB\-G\fP\fIfill\fP ] [ \fB\-H\fP[\fBi\fP][\fInrec\fP] ] [ \fB\-Jz\fP|\fBZ\fP\fIparameters\fP ] [ \fB\-I\fP\fIfix_az\fP ] [ \fB\-K\fP ] [ \fB\-N\fP ] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-S\fP[\fBx\fP]\fIlon0\fP/\fIlat0\fP/\fIlength\fP[/\fIunits\fP] ] [ \fB\-T\fP\fIpen\fP ] [ \fB\-U\fP[\fIjust\fP/\fIdx\fP/\fIdy\fP/][\fBc\fP|\fIlabel\fP] ] [ \fB\-V\fP ] [ \fB\-W\fP\fIpen\fP ] [ \fB\-X\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIx-shift\fP[\fBu\fP]] ] [ \fB\-Y\fP[\fBa\fP|\fBc\fP|\fBr\fP][\fIy-shift\fP[\fBu\fP]] ] [ \fB\-c\fP\fIcopies\fP ] [ \fB\-:\fP[\fBi\fP|\fBo\fP] ] [ \fB\-bi\fP[\fBs\fP|\fBS\fP|\fBd\fP|\fBD\fP[\fIncol\fP]|\fBc\fP[\fIvar1\fP\fB/\fP\fI...\fP]] ] [ \fB\-f\fP\fIcolinfo\fP ] [ \fB\-m\fP[\fBi\fP|\fBo\fP][\fIflag\fP] ] .SH DESCRIPTION \fBpswiggle\fP reads (\fIx\fP,\fIy\fP,\fIz\fP) triplets from files [or standard input] and plots z as a function of distance along track. This means that two consecutive (\fIx\fP,\fIy\fP) points define the local distance axis, and the local \fIz\fP 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 \fIPostScript\fP code is written to standard output. .TP \fIfiles\fP List one or more file-names. If no files are given, \fBpswiggle\fP will read standard input. .TP \fB\-J\fP 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 \fBMEASURE_UNIT\fP setting in \.gmtdefaults4, but this can be overridden on the command line by appending \fBc\fP, \fBi\fP, or \fBm\fP to the scale/width value. When central meridian is optional, default is center of longitude range on \fB\-R\fP option. Default standard parallel is the equator. For map height, max dimension, or min dimension, append \fBh\fP, \fB+\fP, or \fB-\fP to the width, respectively. .br More details can be found in the \fBpsbasemap\fP man pages. .br .sp \fBCYLINDRICAL PROJECTIONS:\fP .br .sp \fB\-Jc\fP\fIlon0/lat0/scale\fP (Cassini) .br \fB\-Jcyl_stere\fP/[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Stereographic) .br \fB\-Jj\fP[\fIlon0/\fP]\fIscale\fP (Miller) .br \fB\-Jm\fP[\fIlon0\fP/[\fIlat0/\fP]]\fIscale\fP (Mercator) .br \fB\-Jm\fP\fIlon0/lat0/scale\fP (Mercator - Give meridian and standard parallel) .br \fB\-Jo\fP[\fBa\fP]\fIlon0/lat0/azimuth/scale\fP (Oblique Mercator - point and azimuth) .br \fB\-Jo\fP[\fBb\fP]\fIlon0/lat0/lon1/lat1/scale\fP (Oblique Mercator - two points) .br \fB\-Joc\fP\fIlon0/lat0/lonp/latp/scale\fP (Oblique Mercator - point and pole) .br \fB\-Jq\fP[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Equidistant) .br \fB\-Jt\fP\fIlon0/\fP[\fIlat0/\fP]\fIscale\fP (TM - Transverse Mercator) .br \fB\-Ju\fP\fIzone/scale\fP (UTM - Universal Transverse Mercator) .br \fB\-Jy\fP[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP (Cylindrical Equal-Area) .br .sp \fBCONIC PROJECTIONS:\fP .br .sp \fB\-Jb\fP\fIlon0/lat0/lat1/lat2/scale\fP (Albers) .br \fB\-Jd\fP\fIlon0/lat0/lat1/lat2/scale\fP (Conic Equidistant) .br \fB\-Jl\fP\fIlon0/lat0/lat1/lat2/scale\fP (Lambert Conic Conformal) .br \fB\-Jpoly\fP/[\fIlon0/\fP[\fIlat0/\fP]]\fIscale\fP ((American) Polyconic) .br .sp \fBAZIMUTHAL PROJECTIONS:\fP .br .sp \fB\-Ja\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Lambert Azimuthal Equal-Area) .br \fB\-Je\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Azimuthal Equidistant) .br \fB\-Jf\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Gnomonic) .br \fB\-Jg\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (Orthographic) .br \fB\-Jg\fP\fIlon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale\fP (General Perspective). .br \fB\-Js\fP\fIlon0/lat0\fP[\fI/horizon\fP]\fI/scale\fP (General Stereographic) .br .sp \fBMISCELLANEOUS PROJECTIONS:\fP .br .sp \fB\-Jh\fP[\fIlon0/\fP]\fIscale\fP (Hammer) .br \fB\-Ji\fP[\fIlon0/\fP]\fIscale\fP (Sinusoidal) .br \fB\-Jkf\fP[\fIlon0/\fP]\fIscale\fP (Eckert IV) .br \fB\-Jk\fP[\fBs\fP][\fIlon0/\fP]\fIscale\fP (Eckert VI) .br \fB\-Jn\fP[\fIlon0/\fP]\fIscale\fP (Robinson) .br \fB\-Jr\fP[\fIlon0/\fP]\fIscale\fP (Winkel Tripel) .br \fB\-Jv\fP[\fIlon0/\fP]\fIscale\fP (Van der Grinten) .br \fB\-Jw\fP[\fIlon0/\fP]\fIscale\fP (Mollweide) .br .sp \fBNON-GEOGRAPHICAL PROJECTIONS:\fP .br .sp \fB\-Jp\fP[\fBa\fP]\fIscale\fP[\fI/origin\fP][\fBr\fP|\fBz\fP] (Polar coordinates (theta,r)) .br \fB\-Jx\fP\fIx-scale\fP[\fBd\fP|\fBl\fP|\fBp\fP\fIpow\fP|\fBt\fP|\fBT\fP][\fI/y-scale\fP[\fBd\fP|\fBl\fP|\fBp\fP\fIpow\fP|\fBt\fP|\fBT\fP]] (Linear, log, and power scaling) .br .TP \fB\-R\fP \fIxmin\fP, \fIxmax\fP, \fIymin\fP, and \fIymax\fP specify the Region of interest. For geographic regions, these limits correspond to \fIwest, east, south,\fP and \fInorth\fP and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append \fBr\fP if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands \fB\-Rg\fP and \fB\-Rd\fP stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). Alternatively, specify the name of an existing grid file and the \fB\-R\fP settings (and grid spacing, if applicable) are copied from the grid. For calendar time coordinates you may either give (a) relative time (relative to the selected \fBTIME_EPOCH\fP and in the selected \fBTIME_UNIT\fP; append \fBt\fP to \fB\-JX\fP|\fBx\fP), or (b) absolute time of the form [\fIdate\fP]\fBT\fP[\fIclock\fP] (append \fBT\fP to \fB\-JX\fP|\fBx\fP). At least one of \fIdate\fP and \fIclock\fP must be present; the \fBT\fP is always required. The \fIdate\fP string must be of the form [-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]] (ISO week calendar), while the \fIclock\fP string must be of the form hh:mm:ss[.xxx]. The use of delimiters and their type and positions must be exactly as indicated (however, input, output and plot formats are customizable; see \fBgmtdefaults\fP). .TP \fB\-Z\fP Gives anomaly scale in data-units/distance-unit. .SH OPTIONS No space between the option flag and the associated arguments. .TP \fB\-A\fP Sets the preferred positive azimuth. Positive wiggles will "gravitate" towards that direction. .TP \fB\-B\fP Sets map boundary annotation and tickmark intervals; see the \fBpsbasemap\fP man page for all the details. .TP \fB\-C\fP Subtract \fIcenter\fP from the data set before plotting [0]. .TP \fB\-D\fP Means there is a data gap if 2 consecutive points are more than \fIgap\fP distance units apart. For geographic map projections the \fIgap\fP is assumed to be in km, else it is in the user's units.\"'. Use \fB\-Dx\fP to specify the gap in projected coordinates (append units \fBc\fP, \fBi\fP, \fBm\fP, or \fBp\fP). .TP \fB\-E\fP Sets the viewpoint's azimuth and elevation (for perspective view) [180/90].\"' For frames used for animation, you may want to append \fB+\fP to fix the center of your data domain (or specify a particular world coordinate point with \fB+w\fP\fIlon0\fP/\fIlat\fP[/\fIz\fP]) which will project to the center of your page size (or specify the coordinates of the projected view point with \fB+v\fP\fIx0\fP/\fIy0). .TP \fB\-G\fP Set fill shade, color or pattern of positive wiggles [Default is black] (See SPECIFYING FILL below). .TP \fB\-H\fP Input file(s) has header record(s). If used, the default number of header records is \fBN_HEADER_RECS\fP. Use \fB\-Hi\fP if only input data should have header records [Default will write out header records if the input data have them]. Blank lines and lines starting with # are always skipped. .TP \fB\-I\fP Set a fixed azimuth projection for wiggles [Default uses track azimuth, but see \fB\-A\fP]. .TP \fB\-K\fP More \fIPostScript\fP code will be appended later [Default terminates the plot system]. .TP \fB\-N\fP Paint negative wiggles instead of positive [Default]. .TP \fB\-O\fP Selects Overlay plot mode [Default initializes a new plot system]. .TP \fB\-P\fP Selects Portrait plotting mode [Default is Landscape, see \fBgmtdefaults\fP to change this]. .TP \fB\-S\fP Draws a simple vertical scale centered on \fIlon0/lat0\fP. Use \fB\-Sx\fP to specify cartesian coordinates instead. \fIlength\fP is in z units, append unit name for labeling .TP \fB\-T\fP Draw track [Default is no track]. Append pen attributes to use [Defaults: width = 0.25p, color = black, texture = solid]. (See SPECIFYING PENS below). .TP \fB\-U\fP Draw Unix System time stamp on plot. By adding \fIjust/dx/dy/\fP, the user may specify the justification of the stamp and where the stamp should fall on the page relative to lower left corner of the plot. For example, BL/0/0 will align the lower left corner of the time stamp with the lower left corner of the plot. Optionally, append a \fIlabel\fP, or \fBc\fP (which will plot the command string.). The \fBGMT\fP parameters \fBUNIX_TIME\fP, \fBUNIX_TIME_POS\fP, and \fBUNIX_TIME_FORMAT\fP can affect the appearance; see the \fBgmtdefaults\fP man page for details. The time string will be in the locale set by the environment variable \fBTZ\fP (generally local time). .TP \fB\-V\fP Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. .TP \fB\-W\fP Draw wiggle outline [Default is no outline]. Append pen attributes to use [Defaults: width = 0.25p, color = black, texture = solid]. (See SPECIFYING PENS below). .TP \fB\-X\fP \fB\-Y\fP Shift plot origin relative to the current origin by (\fIx-shift,y-shift\fP) and optionally append the length unit (\fBc\fP, \fBi\fP, \fBm\fP, \fBp\fP). You can prepend \fBa\fP to shift the origin back to the original position after plotting, or prepend \fBr\fP [Default] to reset the current origin to the new location. If \fB\-O\fP is used then the default (\fIx-shift,y-shift\fP) is (0,0), otherwise it is (r1i, r1i) or (r2.5c, r2.5c). Alternatively, give \fBc\fP to align the center coordinate (x or y) of the plot with the center of the page based on current page size. .TP \fB\-:\fP Toggles between (longitude,latitude) and (latitude,longitude) input and/or output. [Default is (longitude,latitude)]. Append \fBi\fP to select input only or \fBo\fP to select output only. [Default affects both]. .TP \fB\-bi\fP Selects binary input. Append \fBs\fP for single precision [Default is \fBd\fP (double)]. Uppercase \fBS\fP or \fBD\fP will force byte-swapping. Optionally, append \fIncol\fP, the number of columns in your binary input file if it exceeds the columns needed by the program. Or append \fBc\fP if the input file is netCDF. Optionally, append \fIvar1\fP\fB/\fP\fIvar2\fP\fB/\fP\fI...\fP to specify the variables to be read. [Default is 3 input columns]. .TP \fB\-c\fP Specifies the number of plot copies. [Default is 1]. .TP \fB\-f\fP Special formatting of input and/or output columns (time or geographical data). Specify \fBi\fP or \fBo\fP to make this apply only to input or output [Default applies to both]. Give one or more columns (or column ranges) separated by commas. Append \fBT\fP (absolute calendar time), \fBt\fP (relative time in chosen \fBTIME_UNIT\fP since \fBTIME_EPOCH\fP), \fBx\fP (longitude), \fBy\fP (latitude), or \fBf\fP (floating point) to each column or column range item. Shorthand \fB\-f\fP[\fBi\fP|\fBo\fP]\fBg\fP means \fB\-f\fP[\fBi\fP|\fBo\fP]0\fBx\fP,1\fBy\fP (geographic coordinates). .TP \fB\-m\fP Multiple segment file(s). Segments are separated by a special record. For ASCII files the first character must be \fIflag\fP [Default is '>']. For binary files all fields must be NaN and \fB\-b\fP must set the number of output columns explicitly. By default the \fB\-m\fP setting applies to both input and output. Use \fB\-mi\fP and \fB\-mo\fP to give separate settings to input and output. .SS SPECIFYING PENS .TP \fIpen\fP The attributes of lines and symbol outlines as defined by \fIpen\fP is a comma delimetered list of \fIwidth\fP, \fIcolor\fP and \fItexture\fP, each of which is optional. \fIwidth\fP can be indicated as a measure (points, centimeters, inches) or as \fBfaint\fP, \fBthin\fP[\fBner\fP|\fBnest\fP], \fBthick\fP[\fBer\fP|\fBest\fP], \fBfat\fP[\fBter\fP|\fBtest\fP], or \fBobese\fP. \fIcolor\fP specifies a gray shade or color (see SPECIFYING COLOR below). \fItexture\fP is a combination of dashes `-' and dots `.'. .SS SPECIFYING FILL .TP \fIfill\fP The attribute \fIfill\fP specifies the solid shade or solid \fIcolor\fP (see SPECIFYING COLOR below) or the pattern used for filling polygons. Patterns are specified as \fBp\fP\fIdpi/pattern\fP, where \fIpattern\fP gives the number of the built-in pattern (1-90) \fIor\fP the name of a Sun 1-, 8-, or 24-bit raster file. The \fIdpi\fP sets the resolution of the image. For 1-bit rasters: use \fBP\fP\fIdpi/pattern\fP for inverse video, or append \fB:F\fP\fIcolor\fP[\fBB\fP[\fIcolor\fP]] to specify fore- and background colors (use \fIcolor\fP = - for transparency). See \fBGMT\fP Cookbook & Technical Reference Appendix E for information on individual patterns. .SS SPECIFYING COLOR .TP \fIcolor\fP The \fIcolor\fP of lines, areas and patterns can be specified by a valid color name; by a gray shade (in the range 0\-255); by a decimal color code (r/g/b, each in range 0\-255; h-s-v, ranges 0\-360, 0\-1, 0\-1; or c/m/y/k, each in range 0\-1); or by a hexadecimal color code (#rrggbb, as used in HTML). See the \fBgmtcolors\fP manpage for more information and a full list of color names. .SH 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 .br .sp \fBpswiggle\fP track.xym \fB\-R\fP-20/10/-80/-60 \fB\-JS\fP0/90/15\fBc\fP \fB\-Z\fP1000 \fB\-B\fP5 \fB\-C\fP32000 \fB\-P\fP \fB\-G\fPred \fB\-T\fP0.25\fBp\fP,blue \fB\-S\fP1000 \fB\-V\fP > track_xym.ps .SH 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: .br .sp awk '{ if (NR > 1) print atan2(y-$1, x-$2); y=$1; x=$2; }' yourdata.xyz | more .br .sp (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: .br .sp awk '{ print NR, $0 }' yourdata.xyz | \fBfilter1d\fP \fB\-Fb\fP5 \fB\-N\fP4/0 \fB\-\-D_FORMAT\fP=\fIvalue\fP > smoothed.xyz .br .sp and plot this data set instead. .SH "SEE ALSO" .IR GMT (1), .IR gmtcolors (5), .IR filter1d (1), .IR psbasemap (1), .IR splitxyz (1)