1PSCONTOUR(1)                 Generic Mapping Tools                PSCONTOUR(1)
2
3
4

NAME

6       pscontour - Contour xyz-data by direct triangulation [method]
7

SYNOPSIS

9       pscontour  xyzfile  -Ccptfile -Jparameters -Rwest/east/south/north[r] [
10       -A[-][labelinfo]  ]  [  -B[p|s]parameters  ]   [   -D[dumpfile]   ]   [
11       -Eazim/elev[+wlon/lat[/z]][+vx0/y0]  ]  [  -G[d|f|n|l|L|x|X]params  ] [
12       -H[i][nrec] ] [ -I ] [ -K ] [ -Lpen ] [ -N ] [ -O ] [ -P ]  [  -S  ]  [
13       -Tindexfile  ]  [  -U[just/dx/dy/][c|label]  ]  [  -V  ] [ -W[+]pen ] [
14       -X[a|c|r][x-shift[u]] ]  [  -Y[a|c|r][y-shift[u]]  ]  [  -ccopies  ]  [
15       -:[i|o] ] [ -b[i|o][s|S|d|D[ncol]|c[var1/...]] ] [ -m[flag] ]
16

DESCRIPTION

18       pscontour  reads  an ASCII [or binary] xyz-file and produces a raw con‐
19       tour plot by triangulation.  By default, the optimal Delaunay  triangu‐
20       lation  is performed (using either Shewchuk's [1996] or Watson's [1982]
21       method as selected during GMT installation; type  pscontour  -  to  see
22       which method is selected), but the user may optionally provide a second
23       file with network information, such  as  a  triangular  mesh  used  for
24       finite  element  modeling.   In  addition to contours, the area between
25       contours may be painted according to the color palette file.
26
27       xyzfile
28              Raw ASCII (or binary, see -b) xyz data to be contoured.
29
30       -C     name of the color palette file.  Must have  discrete  colors  if
31              you  want  to  paint  the surface (-I).  Only contours that have
32              annotation flags set will be annotated.
33
34       -J     Selects the map projection. Scale is  UNIT/degree,  1:xxxxx,  or
35              width  in  UNIT  (upper case modifier).  UNIT is cm, inch, or m,
36              depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
37              can be overridden on the command line by appending c, i, or m to
38              the scale/width  value.   When  central  meridian  is  optional,
39              default  is  center  of  longitude  range on -R option.  Default
40              standard parallel is the equator.  For map  height,  max  dimen‐
41              sion,  or min dimension, append h, +, or - to the width, respec‐
42              tively.
43              More details can be found in the psbasemap man pages.
44
45              CYLINDRICAL PROJECTIONS:
46
47              -Jclon0/lat0/scale (Cassini)
48              -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
49              -Jj[lon0/]scale (Miller)
50              -Jm[lon0/[lat0/]]scale (Mercator)
51              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
52              lel)
53              -Jo[a]lon0/lat0/azimuth/scale  (Oblique  Mercator  -  point  and
54              azimuth)
55              -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
56              -Joclon0/lat0/lonp/latp/scale  (Oblique  Mercator  -  point  and
57              pole)
58              -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
59              -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
60              -Juzone/scale (UTM - Universal Transverse Mercator)
61              -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
62
63              CONIC PROJECTIONS:
64
65              -Jblon0/lat0/lat1/lat2/scale (Albers)
66              -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
67              -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
68              -Jpoly/[lon0/[lat0/]]scale ((American) Polyconic)
69
70              AZIMUTHAL PROJECTIONS:
71
72              -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
73              -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
74              -Jflon0/lat0[/horizon]/scale (Gnomonic)
75              -Jglon0/lat0[/horizon]/scale (Orthographic)
76              -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
77              (General Perspective).
78              -Jslon0/lat0[/horizon]/scale (General Stereographic)
79
80              MISCELLANEOUS PROJECTIONS:
81
82              -Jh[lon0/]scale (Hammer)
83              -Ji[lon0/]scale (Sinusoidal)
84              -Jkf[lon0/]scale (Eckert IV)
85              -Jk[s][lon0/]scale (Eckert VI)
86              -Jn[lon0/]scale (Robinson)
87              -Jr[lon0/]scale (Winkel Tripel)
88              -Jv[lon0/]scale (Van der Grinten)
89              -Jw[lon0/]scale (Mollweide)
90
91              NON-GEOGRAPHICAL PROJECTIONS:
92
93              -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
94              -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]]  (Linear,  log,
95              and power scaling)
96
97       -R     xmin,  xmax, ymin, and ymax specify the Region of interest.  For
98              geographic regions,  these  limits  correspond  to  west,  east,
99              south,  and north and you may specify them in decimal degrees or
100              in [+-]dd:mm[:ss.xxx][W|E|S|N] format.  Append r if  lower  left
101              and  upper  right  map coordinates are given instead of w/e/s/n.
102              The two shorthands -Rg and -Rd stand for  global  domain  (0/360
103              and  -180/+180  in longitude respectively, with -90/+90 in lati‐
104              tude).  Alternatively, specify the name of an existing grid file
105              and the -R settings (and grid spacing, if applicable) are copied
106              from the grid.  For calendar time  coordinates  you  may  either
107              give  (a) relative time (relative to the selected TIME_EPOCH and
108              in the selected TIME_UNIT; append t to -JX|x), or  (b)  absolute
109              time  of  the form [date]T[clock] (append T to -JX|x).  At least
110              one of date and clock must be present; the T is always required.
111              The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
112              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
113              string  must  be  of the form hh:mm:ss[.xxx].  The use of delim‐
114              iters and their type and positions must be exactly as  indicated
115              (however,  input,  output and plot formats are customizable; see
116              gmtdefaults).
117

OPTIONS

119       No space between the option flag and the associated arguments.
120
121       -A     Give - to disable all annotations.  The optional labelinfo  con‐
122              trols  the  specifics  of the label formatting and consists of a
123              concatenated string made up of  any  of  the  following  control
124              arguments:
125
126              +aangle
127                     For annotations at a fixed angle, +an for line-normal, or
128                     +ap for line-parallel [Default].
129
130              +cdx[/dy]
131                     Sets the clearance between label and optional  text  box.
132                     Append  c|i|m|p  to  specify  the unit or % to indicate a
133                     percentage of the label font size [15%].
134
135              +d     Turns on debug which will draw helper points and lines to
136                     illustrate the workings of the quoted line setup.
137
138              +ffont Sets the desired font [Default ANNOT_FONT_PRIMARY].
139
140              +g[color]
141                     Selects  opaque  text  boxes  [Default  is  transparent];
142                     optionally specify the  color  [Default  is  PAGE_COLOR].
143                     (See SPECIFYING COLOR below).
144
145              +jjust Sets  label  justification [Default is MC].  Ignored when
146                     -SqN|n+|-1 is used.
147
148              +kcolor
149                     Sets color of text labels [Default is  COLOR_BACKGROUND].
150                     (See SPECIFYING COLOR below).
151
152              +llabel
153                     Sets the constant label text.
154
155              +Lflag Sets the label text according to the specified flag:
156
157                     +Lh    Take  the  label  from  the  current  multisegment
158                            header (first scan for an embedded -Llabel option,
159                            if  not  use  the first word following the segment
160                            flag).  For multiple-word labels,  enclose  entire
161                            label in double quotes.
162
163                     +Ld    Take  the  Cartesian plot distances along the line
164                            as the label; append c|i|m|p as the unit  [Default
165                            is MEASURE_UNIT].
166
167                     +LD    Calculate  actual  map distances; append d|e|k|m|n
168                            as the unit [Default is  d(egrees),  unless  label
169                            placement  was  based  on  map distances along the
170                            lines in which case we use the same unit specified
171                            for that algorithm].  Requires a map projection to
172                            be used.
173
174                     +Lf    Use text after the 2nd column in the  fixed  label
175                            location  file  as  the label.  Requires the fixed
176                            label location setting.
177
178                     +Lx    As +Lh but use the headers in the xfile.d instead.
179                            Requires the crossing file option.
180
181              +ndx[/dy]
182                     Nudges  the  placement  of labels by the specified amount
183                     (append c|i|m|p to specify the  units).   Increments  are
184                     considered in the coordinate system defined by the orien‐
185                     tation of the line; use +N to  force  increments  in  the
186                     plot x/y coordinates system [no nudging].
187
188              +o     Selects  rounded rectangular text box [Default is rectan‐
189                     gular].  Not applicable for curved  text  (+v)  and  only
190                     makes sense for opaque text boxes.
191
192              +p[pen]
193                     Draws  the  outline  of  text boxsets [Default is no out‐
194                     line]; optionally specify pen  for  outline  [Default  is
195                     width  =  0.25p,  color  = black, texture = solid].  (See
196                     SPECIFYING PENS below).
197
198              +rmin_rad
199                     Will not place labels where the line's radius  of  curva‐
200                     ture is less than min_rad [Default is 0].
201
202              +ssize Sets the desired font size in points [Default is 9].
203
204              +uunit Appends  unit  to  all line labels. If unit starts with a
205                     leading hyphen (-) then there will be  no  space  between
206                     label value and the unit.  [Default is no unit].
207
208              +v     Specifies  curved  labels  following the path [Default is
209                     straight labels].
210
211              +w     Specifies how many (x, y) points will be used to estimate
212                     label angles [Default is 10].
213
214              +=prefix
215                     Prepends  prefix  to  all  line labels.  If prefix starts
216                     with a leading hyphen (-) then there  will  be  no  space
217                     between  label  value and the prefix. [Default is no pre‐
218                     fix].
219
220       -B     Sets map boundary annotation and  tickmark  intervals;  see  the
221              psbasemap man page for all the details.
222
223       -D     Dump  the (x,y,z) coordinates of each contour to separate files,
224              one for each contour segment. The  files  will  be  named  dump‐
225              file_cont_segment[_i].xyz,  where  cont is the contour value and
226              segment is a running segment number for  each  contour  interval
227              (for closed contours we append _i.)  However, when -m is used in
228              conjunction with  -D  a  single  multisegment  file  is  created
229              instead.
230
231       -E     Sets  the  viewpoint's  azimuth  and  elevation (for perspective
232              view) [180/90].  For frames used for animation, you may want  to
233              append  +  to  fix  the center of your data domain (or specify a
234              particular world coordinate  point  with  +wlon0/lat[/z])  which
235              will  project  to  the  center of your page size (or specify the
236              coordinates of the projected veiw point with +vx0/y0).
237
238       -G     Controls the placement of labels  along  the  contours.   Choose
239              among five controlling algorithms:
240
241              -Gddist[c|i|m|p] or -GDdist[d|e|k|m|n]
242                     For  lower  case  d, give distances between labels on the
243                     plot in your preferred measurement unit c (cm), i (inch),
244                     m (meter), or p (points), while for upper case D, specify
245                     distances in map units and append the unit; choose  among
246                     e (m), k (km), m (mile), n (nautical mile), or d (spheri‐
247                     cal degree).  [Default is 10c or 4i].
248
249              -Gfffile.d
250                     Reads the ascii file ffile.d and places labels  at  loca‐
251                     tions  in  the file that matches locations along the con‐
252                     tours.  Inexact matches and points outside the region are
253                     skipped.
254
255              -Gl|Lline1[,line2,...]
256                     Give  start  and  stop coordinates for one or more comma-
257                     separated straight line segments.  Labels will be  placed
258                     where  these lines intersect the contours.  The format of
259                     each line specification is start/stop,  where  start  and
260                     stop  are either a specified point lon/lat or a 2-charac‐
261                     ter XY key that uses the justification format employed in
262                     pstext   to  indicate  a  point  on  the  map,  given  as
263                     [LCR][BMT].  -GL will interpret the point pairs as defin‐
264                     ing great circles [Default is straight line].
265
266              -Gnn_label
267                     Specifies  the  number of equidistant labels for contours
268                     line [1].  Upper case -GN starts labeling exactly at  the
269                     start  of the line [Default centers them along the line].
270                     -GN-1 places one justified label at  start,  while  -GN+1
271                     places  one  justified  label  at  the  end  of contours.
272                     Optionally, append /min_dist[c|i|m|p] to enforce  that  a
273                     minimum  distance separation between successive labels is
274                     enforced.
275
276              -Gx|Xxfile.d
277                     Reads the multi-segment file xfile.d and places labels at
278                     the intersections between the contours and the lines inx‐
279                     file.d.  -GX will resample the lines first  along  great-
280                     circle arcs.
281
282              In  addition, you may optionally append +rradius[c|i|m|p] to set
283              a minimum label separation in the x-y plane [no limitation].
284
285       -H     Input file(s) has header record(s).  If used, the default number
286              of  header records is N_HEADER_RECS.  Use -Hi if only input data
287              should have  header  records  [Default  will  write  out  header
288              records  if  the  input  data  have them]. Blank lines and lines
289              starting with # are always skipped.
290
291       -I     Color the triangles using the color palette table.
292
293       -Jz    Sets the vertical scaling (for 3-D maps).  Same syntax as -Jx.
294
295       -K     More PostScript code will be appended later [Default  terminates
296              the plot system].
297
298       -L     Draw  the  underlying  triangular  mesh  using the specified pen
299              attributes [Default is no mesh].  (See SPECIFYING PENS below).
300
301       -N     Do NOT clip contours or image at the  boundaries  [Default  will
302              clip to fit inside region -R].
303
304       -O     Selects  Overlay  plot mode [Default initializes a new plot sys‐
305              tem].
306
307       -P     Selects Portrait plotting mode [Default is Landscape, see gmtde‐
308              faults to change this].
309
310       -S     Skip  all input xyz points that fall outside the region [Default
311              uses all the data in the triangulation].
312
313       -T     Give name of file with network information.   Each  record  must
314              contain  triplets  of  node numbers for a triangle [Default com‐
315              putes these using Delaunay triangulation (see triangulate)].
316
317       -U     Draw Unix System time stamp on plot.  By adding just/dx/dy/, the
318              user  may  specify  the justification of the stamp and where the
319              stamp should fall on the page relative to lower left  corner  of
320              the  plot.  For example, BL/0/0 will align the lower left corner
321              of the time stamp with  the  lower  left  corner  of  the  plot.
322              Optionally,  append  a  label, or c (which will plot the command
323              string.).  The  GMT  parameters  UNIX_TIME,  UNIX_TIME_POS,  and
324              UNIX_TIME_FORMAT  can affect the appearance; see the gmtdefaults
325              man page for details.  The time string will be in the locale set
326              by the environment variable TZ (generally local time).
327
328       -V     Selects verbose mode, which will send progress reports to stderr
329              [Default runs "silently"].
330
331       -W     Select contouring and set contour pen attributes.  If the + flag
332              is  set  then the contour lines are colored according to the cpt
333              file (see -C).  (See SPECIFYING PENS below).
334
335       -X -Y  Shift plot origin relative to the current origin by  (x-shift,y-
336              shift)  and optionally append the length unit (c, i, m, p).  You
337              can prepend a to shift the origin back to the original  position
338              after  plotting,  or  prepend   r [Default] to reset the current
339              origin to the new location.  If -O is used then the default  (x-
340              shift,y-shift)  is  (0,0), otherwise it is (r1i, r1i) or (r2.5c,
341              r2.5c).  Alternatively, give c to align the center coordinate (x
342              or  y)  of the plot with the center of the page based on current
343              page size.
344
345       -:     Toggles between  (longitude,latitude)  and  (latitude,longitude)
346              input and/or output.  [Default is (longitude,latitude)].  Append
347              i to select input only or o to  select  output  only.   [Default
348              affects both].
349
350       -bi    Selects binary input.  Append s for single precision [Default is
351              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
352              Optionally,  append  ncol,  the number of columns in your binary
353              input file if it exceeds the columns needed by the program.   Or
354              append  c  if  the  input  file  is  netCDF.  Optionally, append
355              var1/var2/... to specify the variables to be read.  [Default  is
356              3  input  columns].   Use  4-byte  integer triplets for node ids
357              (-T).
358
359       -bo    Selects binary output.  Append s for single  precision  [Default
360              is  d  (double)].   Uppercase  S  or D will force byte-swapping.
361              Optionally, append ncol, the number of desired columns  in  your
362              binary output file.  [Default is 3 output columns].
363
364       -c     Specifies the number of plot copies. [Default is 1].
365
366       -m     When  used  in conjunction with -D a single multisegment file is
367              created, and each contour section is preceded by a header record
368              whose first column is flag followed by the contour level.
369
370   SPECIFYING PENS
371       pen    The attributes of lines and symbol outlines as defined by pen is
372              a comma delimetered list of width, color and  texture,  each  of
373              which is optional.  width can be indicated as a measure (points,
374              centimeters, inches) or as faint, thin[ner|nest], thick[er|est],
375              fat[ter|test],  or obese.  color specifies a gray shade or color
376              (see SPECIFYING COLOR  below).   texture  is  a  combination  of
377              dashes `-' and dots `.'.
378
379   SPECIFYING COLOR
380       color  The  color  of  lines,  areas and patterns can be specified by a
381              valid color name; by a gray shade (in the  range  0-255);  by  a
382              decimal  color  code  (r/g/b, each in range 0-255; h-s-v, ranges
383              0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by  a  hexa‐
384              decimal  color code (#rrggbb, as used in HTML).  See the gmtcol‐
385              ors manpage for more information and a full list of color names.
386

EXAMPLES

388       To make a raw contour plot from the file topo.xyz and drawing the  con‐
389       tours  (pen  = 0.5p) given in the color palette file topo.cpt on a Lam‐
390       bert map at 0.5 inch/degree along the standard parallels 18 and 24, use
391
392       pscontour topo.xyz -R320/330/20/30 -Jl18/24/0.5i  -Ctopo.cpt  -W0.5p  >
393       topo.ps
394
395       To create a color PostScript plot of the numerical temperature solution
396       obtained on a triangular mesh whose node coordinates  and  temperatures
397       are  stored  in  temp.xyz  and  mesh  arrangement  is given by the file
398       mesh.ijk, using the colors in temp.cpt, run
399
400       pscontour temp.xyz -R0/150/0/100 -Jx0.1 -Ctemp.cpt -G -W0.25p > temp.ps
401

BUGS

403       Sometimes there will appear to be thin lines of the wrong color in  the
404       image.   This  is  a round-off problem which may be remedied by using a
405       higher value of DOTS_PR_INCH in the .gmtdefaults4 file.
406

SEE ALSO

408       GMT(1),  gmtcolors(5),  grdcontour(1),  grdimage(1),   nearneighbor(1),
409       psbasemap(1), psscale(1), surface(1), triangulate(1)
410

REFERENCES

412       Watson,  D.  F., 1982, Acord: Automatic contouring of raw data, Comp. &
413       Geosci., 8, 97-101.
414       Shewchuk, J. R., 1996, Triangle: Engineering a 2D Quality Mesh  Genera‐
415       tor  and Delaunay Triangulator, First Workshop on Applied Computational
416       Geometry (Philadelphia, PA), 124-133, ACM, May 1996.
417       www.cs.cmu.edu/~quake/triangle.html
418
419
420
421GMT 4.5.6                         10 Mar 2011                     PSCONTOUR(1)
Impressum