Previous: pltax Up: ../plot79_p.html Next: pltbo


PLTAX3

       SUBROUTINE  PLTAX3 (X,Y,Z, DX,DY,DZ, PX,PY,PZ, TITLE,NCHAR, SIZE,
      X     VMIN,DV,VMAX, TICK, MODE)
 C$    (Axis - Three Dimensional)
 C$    Draw a linear axis in  3-D space.  This routine provides  a
 C$    convenient user interface to  the 2-D axis routine,  PLTAX.
 C$    It uses  the axis  origin,  axis direction,  and  lettering
 C$    plane specified  to  define a  world  coordinate  modelling
 C$    transformation matrix which  will map a  2-D axis drawn  by
 C$    PLTAX onto the desired axis.  The arguments are:
 C$
 C$    (X,Y,Z)........3-D  world coordinates  of  origin  of axis.
 C$                   The  coordinate   system   may   be   either
 C$                   right-handed or left-handed.
 C$    (DX,DY,DZ).....Vector defining the  direction of the  axis.
 C$                   It need not be normalized.
 C$    (PX,PY,PZ).....Vector defining  the  normal vector  of  the
 C$                   plane in which lettering will be drawn.   It
 C$                   points away  from  an observer  reading  the
 C$                   lettering from in  front of  the plane.   It
 C$                   need not be normalized.
 C$
 C$    The remaining variables are exactly those passed to PLTAX,
 C$    the descriptions of which follow:
 C$
 C$    TITLE...Hollerith label for the axis.  This is always drawn
 C$            centered along the axis in the direction away  from
 C$            (X,Y).  Very long titles will be drawn with smaller
 C$            characters in order  to fit on  one line.   Leading
 C$            and trailing blanks  are automatically ignored  for
 C$            the purposes of centering.
 C$
 C$    NCHAR... .GT. 0 - Number of characters in TITLE(*).  The
 C$                      current font will be used.
 C$             .LE. 0 - No title to be drawn.
 C$
 C$    SIZE....Length of the axis in world units.  SIZE .LE. 0.0
 C$            will be assumed to be bad input and will cause
 C$            immediate return.
 C$
 C$    THETA...Counterclockwise angle of inclination of axis in
 C$            degrees.  THETA =  0.0 for a  horizontal axis,  and
 C$            90.0 for a vertical axis.
 C$
 C$    VMIN....Starting value of variable along axis.
 C$
 C$    DV......Increment  of  variable  between  successive ticks.
 C$            numbering will be placed at each tick, if there  is
 C$            sufficient space.  Otherwise, numbering will be  at
 C$            intervals of 2, 5, or 10 ticks, or at some power of
 C$            ten  times  one  of  these.   It  is  the  caller's
 C$            responsibility to ensure  that (VMAX-VMIN)/DV is  a
 C$            positive integer.
 C$
 C$    VMAX....Ending value of variable along axis.
 C$
 C$    TICK.... .GT. 0.0 - Length of tick marks above
 C$                        (counterclockwise from) the axis.
 C$             .EQ. 0.0 - No tick marks to be drawn.
 C$             .LT. 0.0 - Length of tick marks below (clockwise
 C$                        from) the axis.
 C$            A usual  value will  be TICK  = 0.015  on the  unit
 C$            square, but choosing  TICK equal to  the length  of
 C$            the perpendicular axes will form a grid.
 C$
 C$    MODE......Option flags stored in the low-order bits of  the
 C$              integer value.  These are selected by adding  one
 C$              or more of the following option values, and  then
 C$              setting the sign of  the resulting sum to  select
 C$              numbering and titling above (+) or below (-)  the
 C$              axis.
 C$
 C$               1 - Number  the  axis.   Even  values  of   MODE
 C$                   suppress numbering,  but  still  affect  the
 C$                   choice of tick mark spacing.
 C$               2 - Numbering   perpendicular (i.e. rotated  -90
 C$                   degrees)  to  the  axis;  otherwise  it   is
 C$                   parallel to the axis.
 C$               4 - Omit the first number along the axis.   This
 C$                   can be useful to  prevent text overlap  when
 C$                   more than one axis is drawn from a point.
 C$               8 - Omit the last number along the axis.
 C$              16 - Omit any zero number  along the axis.   This
 C$                   can be useful for drawing axes  intersecting
 C$                   at the origin.
 C$
 C$              Any value outside the  legal range -31..+31  will
 C$              raise an error condition.  The usual choice for a
 C$              numbered left vertical  (Y) axis will  be MODE  =
 C$              +3, and for a numbered lower horizontal (X)  axis
 C$              will be  MODE  = -1.   The  usual choice  for  an
 C$              unnumbered right vertical axis will be MODE =  +2
 C$              or -2,  and for  an unnumbered  upper  horizontal
 C$              axis will be MODE =  0.
 C$
 C$              The sizes and positions of number labels, even if
 C$              they are not  drawn, affect the  choice of  where
 C$              longer tick marks are drawn.  In the common  case
 C$              where the four  sides of a  graph have axes,  but
 C$              two are  unnumbered,  for  the  unnumbered  axes,
 C$              simply subtract 1  from the  unsigned MODE  value
 C$              used for the opposite numbered axis.
 C$
 C$    See SUBROUTINE PLTAX for further remarks on axis plotting.
 C$
 C$    (19-MAR-84)