%N strfmtcg %F $MIR/src/subs/cgpgsubs.for
%D Format a number with PGNUMB
%P nebk
%: plotting
%B
      subroutine strfmtcg (xnum, ns, str, is)

      real xnum
      integer ns, is
      character*(*) str
  ---------------------------------------------------------------------
  Format a number with a specified number of significant figures
  with the PGPLOT routine pgnumb. It chooses automatically decimal
  or exponential notation.  Pgplot superscripting escape sequences
  may be embedded in the string in the latter case.

  Input:
    xnum    The number = mm * 10**pp
    ns      Number of desired significant figures
  Output:
    str     Formatted string
    is      Length of string
