DELETE DATE_MULTI_LINE; REDEFINE PLOT DATE_MULTI_LINE DECLARE X_REF, X_LENGTH, X_MIN, X_MAX DECLARE Y_REF, Y_LENGTH, Y_MIN_VALUE, Y_MAX_VALUE, D_LABEL DECLARE I,J,K,N, COUNT, MX, WIDTH DECLARE VECTOR DATES, Y1, Y2, Y3, Y_MIN, Y_MAX, Y_MX, COLOR DECLARE STRING VECTOR Y_LABEL, CHR ENTRY 0 (X_LABEL : STRING, LABEL_1 : STRING, LABEL_2 : STRING, LABEL_3 : STRING) BEGIN PLOT HOUSEKEEP 0 SET_SEGMENT 0 PRINT 'S(M0(L0)1(L33)2(L66)3(L99))' PRINT 'S(M0(AD)1(AR)2(AC)3(AY))' PRINT 'L(A2)' PRINT 'L"5"00FF8181818181FF' PRINT 'L"6"0018244281422418' PRINT 'L"0"00FF814242242418' OUTPUT_SEGMENT 0 SET_SEGMENT 1 X_REF = 100 Y_REF = 360 X_LENGTH = 600 Y_LENGTH = 350 PLOT LABEL 0 (X_REF, Y_REF, X_LENGTH, Y_LENGTH, X_LABEL, D_LABEL) CHR(1) = '6' COLOR(1) = 1 Y_LABEL(1) = LABEL_1 CHR(2) = '5' COLOR(2) = 2 Y_LABEL(2) = LABEL_2 CHR(3) = '0' COLOR(3) = 1 Y_LABEL(3) = LABEL_3 INCR I OVER Y_LABEL IF LENGTH(Y_LABEL(I)) NE 0 THEN COUNT = COUNT + 1 END ENTRY 1 (X : DATE, Y1_VALUE, Y2_VALUE, Y3_VALUE) BEGIN DATES (SIZE (DATES) + 1 ) = X Y1(SIZE(Y1)+1) = Y1_VALUE Y2(SIZE(Y2)+1) = Y2_VALUE Y3(SIZE(Y3)+1) = Y3_VALUE END ENTRY 2 BEGIN Y_MIN(1) = MIN(Y1) Y_MIN(2) = MIN(Y2) Y_MIN(3) = MIN(Y3) Y_MAX(1) = MAX(Y1) Y_MAX(2) = MAX(Y2) Y_MAX(3) = MAX(Y3) Y_MIN_VALUE = MIN(Y_MIN) Y_MAX_VALUE = MAX(Y_MAX) PLOT LABEL 3 (Y_MIN_VALUE, Y_MAX_VALUE) X_MIN = MIN (DATES) X_MAX = MAX (DATES) PLOT LABEL 6 (X_MIN, X_MAX, DATES) SORT(DATES, Y1, Y2, Y3) PRINT 'T(BA2S[8,16])' IF COUNT GE 1 THEN PLOT DATE_MULTI_LINE 3 (Y1) IF COUNT GE 2 THEN PLOT DATE_MULTI_LINE 3 (Y2) IF COUNT GE 3 THEN PLOT DATE_MULTI_LINE 3 (Y3) PRINT 'T(E)' WIDTH = X_LENGTH / 30 Y_MX(30) = 0 INCR I OVER DATES BEGIN Y_MIN(1) = Y1(I) Y_MIN(2) = Y2(I) Y_MIN(3) = Y3(I) MX = MIN(Y_MIN) J = ((DATES(I) - X_REF) / WIDTH) + 1 Y_MX(J) = 1000 IF Y_MX(J) GT MX THEN Y_MX(J) = MX END INCR I OVER Y_MX IF (I NE 1) AND (Y_MX(I) EQ 0) THEN Y_MX(I) = Y_MX(I -1) OUTPUT_SEGMENT 1 PLOT LEGEND 4 (X_REF,Y_REF,X_LENGTH,Y_LENGTH,WIDTH,Y_MX,CHR,COLOR,Y_LABEL) PLOT HOUSEKEEP 2 END ENTRY 3 (Y : VECTOR) BEGIN PLOT LABEL 8 (Y) N = N + 1 PRINT 'P', LXY(DATES(1), Y(1)), 'W(I', CVT(COLOR(N)), ')' INCR I OVER DATES PRINT 'V', LXY(DATES(I), Y(I)) PRINT 'W(R)' INCR I OVER DATES PRINT 'P', LXY(DATES(I)-4, Y(I)-10), 'T', QUOTE(CHR(N)) PRINT 'W(V)' END END_PLOT