%N annboxcg %F $MIR/src/subs/cgpgsubs.for
%D Annotate plot with information from a box image
%P nebk
%: plotting
%B
      subroutine annboxcg (lb, bin, bfac, yinc, xpos, ypos)

      integer   lb
      character bin*(*)
      real      bfac(5), yinc, xpos, ypos
  ---------------------------------------------------------------------
  Annotate plot with box image information

  Input:
    lb      Handle for box images
    bin     Box image
    bfac    (1)   Maximum value if pixel in region of first subplot
            (2-3) Scale factors, in x and y, to convert pixel value
                  into box width in world coordinates
            (4-5) Scale factors, in x and y, giving box widths per mm
                  E.g. if pixel is 50 rad/m/m, then these scale factors
                  say you have bfac(4) and bfac(5) rad/m/m per mm
    yinc    World increment between text lines
    xpos    World x coordinate for text lines
  Input/output
    ypos    World y coordinate for next text line
