SUBROUTINE ERRPLT(X,YLO,YAVG,YHI,NPTS,DIA) C C This subroutine plots error symbols at the locations C specified by the X, YLO, YAVG and YHI arrays. C The coordinates in all four arrays should be in units C of the axes. C C X,YAVG Arrays containing the coordinates of the C circle center. C YLO, Arrays containing the Y coordinates of the lower C YHI and upper limits of the error bar. C NPTS Number of points in the above arrays. C DIA Diameter of the circle in scale inches. If DIA .LT. 0. C a "plus sign" will be drawn in the middle of the circle. C COMMON /PSTN/ XZero, XScale, LogX, 1 YZero, YScale, LogY, YMin LOGICAL LogX,LogY DIMENSION X(1), YLO(1), YAVG(1), YHI(1) C C - CALCULATE THE RELATIVE COORDINATES OF THE CIRCLE (OCTAGON). RADIUS = 0.5*DIA IF( DIA .GT. 0. ) GO TO 100 RADIUS = -RADIUS PLUS = 0.4*RADIUS 100 O1 = 0.38268*RADIUS O2 = 0.92388*RADIUS C DO 1000 I=1,NPTS C C - DRAW OUT CIRCLE. CALL PSTN(X(I),YAVG(I),XP,YP) CALL CALPLT(XP+O1,YP+O2,3) CALL CALPLT(XP+O2,YP+O1,2) CALL CALPLT(XP+O2,YP-O1,2) CALL CALPLT(XP+O1,YP-O2,2) CALL CALPLT(XP-O1,YP-O2,2) CALL CALPLT(XP-O2,YP-O1,2) CALL CALPLT(XP-O2,YP+O1,2) CALL CALPLT(XP-O1,YP+O2,2) CALL CALPLT(XP+O1,YP+O2,2) C C - DRAW OUT "PLUS SIGN" IF NECESSARY. IF( DIA .GT. 0. ) GO TO 200 CALL CALPLT(XP,YP+PLUS,3) CALL CALPLT(XP,YP-PLUS,2) CALL CALPLT(XP+PLUS,YP,3) CALL CALPLT(XP-PLUS,YP,2) C C - DRAW OUT LOWER HORIZONTAL LINE. 200 CALL PSTN(X(I),YLO(I),XP,YH) CALL CALPLT(XP-RADIUS,YH,3) CALL CALPLT(XP+RADIUS,YH,2) C C - DRAW CONNECTING LINE IF BELOW CIRCLE. IF( YH .GE. YP-SIGN(O2,YScale) ) GO TO 300 CALL CALPLT(XP,YH,2) CALL CALPLT(XP,YP-SIGN(O2,YScale),2) C C - DRAW OUT UPPER HORIZONTAL LINE. 300 CALL PSTN(X(I),YHI(I),XP,YH) CALL CALPLT(XP-RADIUS,YH,3) CALL CALPLT(XP+RADIUS,YH,2) C C - DRAW CONNECTING LINE IF ABOVE CIRCLE. IF( YH .LE. YP+SIGN(O2,YScale) ) GO TO 1000 CALL CALPLT(XP,YH,2) CALL CALPLT(XP,YP+SIGN(O2,YScale),2) C 1000 CONTINUE RETURN END