NAME

       pstext - To plot text on maps


SYNOPSIS

       pstext  textfile -Jparameters -Rwest/east/south/north[r] [ -Btickinfo ]
       [ -Cdx/dy ] -D[j]dx/dy[v[red/green/blue] ] [  -Eazimuth/elevation  ]  [
       -Gred/green/blue  ] [ -H[nrec] ] [ -K ] [ -L ] [ -M[flag] ] [ -N ] [ -O
       ]  [  -P  ]  [  -Spen   ]   [   -U[/dx/dy/][label]   ]   [   -V   ]   [
       -W[red/green/blue][o|O|c|C[pen]]  ]  [  -Xx-shift  ]  [  -Yy-shift  ] [
       -Zzlevel ] [ -ccopies ] [ -: ]


DESCRIPTION

       pstext plots textstrings of variable size, font type, and  orientation.
       Various map projections are provided, with the option to draw and anno-
       tate the map boundaries. PostScript code is written to standard output.
       Greek  characters, subscript, superscript, and small caps are supported
       as follows: The sequence @~ toggles between the selected font and Greek
       (Symbol).  @%no% sets the font to no; @%% resets the font to the start-
       ing font, @- toggles subscripts on/off, @+ toggles superscript  on/off,
       and @# toggles small caps on/off. @@ prints the @ sign. @e, @o, @a, @E,
       @O, @A give the accented Scandinavian characters. Composite  characters
       (overstrike) may be indicated with the @!<char1><char2> sequence, which
       will print the two characters on top of each other. To learn the  octal
       codes for symbols not available on the keyboard and some accented Euro-
       pean characters, see Section 4.16 and Appendix F in the  GMT  Technical
       Reference  and  Cookbook.  Note  that  CHAR_ENCODING must be set to and
       extended character set in your .gmtdefaults4 file in order to  use  the
       accented characters.  Using the -W option, a colored rectangle underly-
       ing the text may be plotted (Does not work for strings  with  sub/super
       scripts,  symbols,  or  composite  characters, except in paragraph mode
       (-M)).

       textfile
              This file contains 1 or more records with (x,  y,  size,  angle,
              fontno,  justify,  text).  If no file is given, pstext will read
              standard input.  size is text size in points, angle is  measured
              in  degrees  counter-clockwise  from horizontal, fontno sets the
              font type, justify sets the alignment.   If  fontno  is  not  an
              integer,  then  it  is taken to be a textstring with the desired
              fontname. See the gmtdefaults man page for names and numbers  of
              available  fonts (or run pstext -L). The alignment refers to the
              part of the textstring that will be mapped onto the (x,y) point.
              Choose  a  2 character combination of L, C, R (for left, center,
              or right) and T, M, B for top, middle, or bottom. e.g.,  BL  for
              lower left.

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

       -Jz    Sets the vertical scaling (for 3-D maps). Same syntax as -Jx.

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


OPTIONS

       No space between the option flag and the associated arguments.

       -B     Sets map boundary annotation and  tickmark  intervals;  see  the
              psbasemap man page for all the details.

       -C     Sets  the  clearance  between  the  text and the surrounding box
              [15%].  Only used if -W is specified. Append the unit  you  want
              (cm,  inch,  meter.   or  point;  if  not  given we consult MEA-
              SURE_UNIT) or % for a percentage of the font size.

       -D     Offsets the text from the projected (x,y) point by dx,dy  [0/0].
              Use -Dj to offset the text away from the point instead (i.e. the
              text’s justification will determine the direction of the shift).
              In  paragraph mode (-M), one may append v which will draw a line
              from the original point to the shifted point.  Optionally append
              a pen for this line.

       -E     Sets  the  viewpoint’s  azimuth  and  elevation (for perspective
              view) [180/90].  (Not implemented for paragraph mode).

       -G     Sets the gray-shade (0-255) or color (r/g/b,  each  0-255)  used
              for drawing the text. [Default is black]

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

       -K     More  PostScript code will be appended later [Default terminates
              the plot system].

       -L     Lists the font-numbers and font-names available, then exits.

       -M     Paragraph mode. Files must be multiple segment  files.  Segments
              are  separated by a special record whose first character must be
              flag [Default is ’>’].  Starting in the 3rd column, we expect to
              find  information  pertaining to the typesetting of a text para-
              graph (the remaining lines  until  next  segment  header).   The
              information expected is (x y size angle fontno justify linespace
              parwidth parjust), where x  y  size  angle  fontno  justify  are
              defined  above, while linespace and parwidth are the linespacing
              and paragraph width, respectively. The justification of the text
              paragraph  is governed by parjust which may be l(eft), c(enter),
              r(ight), or j(ustified). The segment header is followed  by  one
              or  more  lines with paragraph text. Text may contain the escape
              sequences discussed  above  as  well  as  three  more:  @;r/g/b;
              changes the font color (@;; resets it), @:size: changes the font
              size (@:: resets it), and @_ toggles underline on/off.  Separate
              paragraphs with a blank line.

       -N     Do NOT clip text at map boundaries [Default will clip].

       -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     Draw  text outline. Append pen attributes.  (Not implemented for
              paragraph mode).

       -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     Paint a rectangle beneath the text string. Set color [Default is
              no  fill].   Append  o  to  draw rectangle outline, add a pen to
              specify pen attributes [1/0/0/0].  Choose upper case O to get  a
              rounded rectangle.  Choose lower case c to get a concave rectan-
              gle (only in paragraph mode).  Choose upper case C to get a con-
              vex rectangle (only in paragraph mode).

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

       -Z     For  3-D projections: Sets the z-level of the basemap [0].  (Not
              implemented for paragraph mode).

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

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


EXAMPLES

       To  plot the outlines of the textstrings stored in the file text.d on a
       Mercator plot with the given specifications, use

       pstext text.d -R-30/30/-10/20 -Jm0.1i -P -B5 -S0.5p > plot.ps

       To add a typeset figure caption for a 3-inch wide illustration, use

       pstext -R0/3/0/5 -JX3i -O -H -M -N << EOF >> figure.ps
       This is an optional header record
       > 0 -0.5 12 0 4 LT 13p 3i j
       @%5%Figure 1.@%% This illustration shows nothing useful, but  it  still
       needs
       a figure caption. Highlighted in @;255/0/0;red@;; you can see the loca-
       tions
       of cities where it is @_impossible@_ to get any good Thai  food;  these
       are to be avoided.
       EOF


BUGS

       In  paragraph  mode,  the  presence  of  composite characters and other
       escape sequences may lead to unfortunate word splitting.
       The -N option does not adjust the BoundingBox information  so  you  may
       have  to  post-process the PostScript outout with epstool or ps2epsi to
       obtain a correct BoundingBox.


SEE ALSO

       gmt(l), psbasemap(l)



GMT4.0                            1 Oct 2004                         PSTEXT(l)

Man(1) output converted with man2html