%N lab3cg %F $MIR/src/subs/cgpgsubs.for
%D Label sub-plot with value and/or pixel of 3rd axis
%P nebk
%: plotting
%B
      subroutine lab3cg (lun, doerase, doval, dopix, labtyp, ipl,
     *                   plav, val3form)

      integer   lun
      logical   doerase, doval, dopix
      character labtyp(2)*6
      integer   ipl, plav
      character val3form*(*)
  ---------------------------------------------------------------------
  Label the plot with the third axis values or pixel or both

  Input
    lun        Handle of image
    doerase    .true. to erase the background behind the string
    doval      .true. if writing value
    dopix      .true. if writing pixel
    labtyp     Axis label types
    ipl        Start plane of image being plotted
    plav       Number of planes being averaged for current sub-plot
    val3form   Format for 3val label
