      SUBROUTINE BARHED(IPAGE,PLDESC,PLHAND,PTITLE,FIRST)               BARH001
C----------------------------------------------------------------------+BARH002
C                                                                       BARH003
C  SUBROUTINE BARHED  -  Start new page for frequency distribution plot BARH004
C                                                                       BARH005
C----------------------------------------------------------------------+BARH006
                                                                        BARH007
CHECK v.3.1-->                                                          BARH008
C      SUBROUTINE BARHED(IPAGE)                                         BARH009
CHECK v.3.2-->                                                          BARH010
C      SUBROUTINE BARHED(IPAGE,PLDESC)                                  BARH011
CHECK v.3.2<--                                                          BARH012
CHECK v.3.1<--                                                          BARH013
                                                                        BARH014
      INCLUDE 'bplot.inc'                                               BARH015
                                                                        BARH016
      CHARACTER*2   PAGENO                                              BARH017
      CHARACTER*7   PAGE                                                BARH018
CHECK v.3.2-->                                                          BARH019
      CHARACTER*9   PLHAND                                              BARH020
CHECK v.3.2<--                                                          BARH021
CHECK v.3.1-->                                                          BARH022
      CHARACTER*30  PLDESC                                              BARH023
CHECK v.3.1<--                                                          BARH024
CHECK v.3.2-->                                                          BARH025
      CHARACTER*60  PTITLE                                              BARH026
CHECK v.3.2<--                                                          BARH027
      INTEGER       IPAGE                                               BARH028
CHECK v.3.2-->                                                          BARH029
      LOGICAL       FIRST                                               BARH030
CHECK v.3.2<--                                                          BARH031
      REAL          DX, DY, GTGPOS, GTGSIZ, XCENTR, XSTART, YTOP        BARH032
                                                                        BARH033
      PARAMETER    (DX = 3.0, DY = 2.0, GTGPOS = 5.0, GTGSIZ = 8.0)     BARH034
                                                                        BARH035
C---- Open new PostScript file                                          BARH036
CHECK v.3.1-->                                                          BARH037
C      CALL PSNAME(FILPS,PSLEN,IPLOT)                                   BARH038
CHECK v.3.2-->                                                          BARH039
C      CALL PSNAME(FILPS,PSLEN,IPLOT,PLDESC)                            BARH040
CHECK v.3.2<--                                                          BARH041
CHECK v.3.1<--                                                          BARH042
CHECK v.3.2-->                                                          BARH043
C      CALL PSOPEN(FILPS,BBOXX1,BBOXX2,BBOXY1,BBOXY2,MXCOLR,RGB,        BARH044
C     -    INCOLR(PLTYPE),COLPLT(PLTYPE,1))                             BARH045
      IF (.NOT.COMBPS .OR. FIRST) THEN                                  BARH046
          CALL PSNAME(FILPS,PSLEN,IPLOT,PLDESC,PLHAND,WITHAN)           BARH047
CHECK v.3.4-->                                                          BARH048
C          CALL PSOPEN(FILPS,MXCOLR,RGB,INCOLR(PLTYPE),PTITLE,          BARH049
C     -        IPAGE + 1)                                               BARH050
          CALL PSOPEN(FILPS,MXCOLR,RGB,NCOLOR,INCOLR(PLTYPE),PTITLE,    BARH051
     &        IPAGE + 1)                                                BARH052
CHECK v.3.4<--                                                          BARH053
      ENDIF                                                             BARH054
      CALL PSPAGE(FILPS,BBOXX1,BBOXX2,BBOXY1,BBOXY2,MXCOLR,RGB,         BARH055
CHECK v.3.4-->                                                          BARH056
C     -    INCOLR(PLTYPE),COLPLT(PLTYPE,1),IPAGE + 1,PLABEL)            BARH057
     &    INCOLR(PLTYPE),COLPLT(PLTYPE,1),IPAGE + 1,PLABEL,.FALSE.)     BARH058
CHECK v.3.4<--                                                          BARH059
CHECK v.3.2<--                                                          BARH060
                                                                        BARH061
C---- Initialise variables                                              BARH062
      GOTOFF = .FALSE.                                                  BARH063
      XSTART = BBOXX1 + XFQLMG                                          BARH064
      XCENTR = (BBOXX1 + BBOXX2) / 2.0                                  BARH065
      YTOP = BBOXY2 - YFQTMG                                            BARH066
      CALL PSLWID(0.1)                                                  BARH067
                                                                        BARH068
C---- Main graph heading                                                BARH069
      CALL PSCTXT(XCENTR,YTOP + 66.0,30.0, HEADIN(1:HLEN))              BARH070
      CALL PSCTXT(XCENTR,YTOP + 36.0,25.0,BRCODE(1:BLEN))               BARH071
                                                                        BARH072
CHECK v.3.2-->                                                          BARH073
C---- Print program name in top left-hand corner                        BARH074
      CALL PSTEXT(BBOXX1 + 15.0,BBOXY2 - 10.0,10.0,'PROCHECK')          BARH075
CHECK v.3.2<--                                                          BARH076
                                                                        BARH077
C---- Print page number                                                 BARH078
      IPAGE = IPAGE + 1                                                 BARH079
      WRITE(PAGENO,'(I2)') IPAGE                                        BARH080
      PAGE = 'Page ' // PAGENO                                          BARH081
      CALL PSCTXT(BBOXX2 - 40.0,BBOXY2 - 20.0,12.0,PAGE)                BARH082
                                                                        BARH083
      RETURN                                                            BARH084
      END                                                               BARH085
