Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - datatrieve/pc350/stacked_bar.cdd-plot
There are 3 other files named stacked_bar.cdd-plot in the archive. Click here to see a list.
{]&ie]yno(0]:]*0],LLABEL 0]N]>0]@XALABEL ]\y \zYVALUEP ]] ]	YMXP \X] ]COLORP \]\\CNT \c\bJTEMP \i\hK \n\mKOUNT \G\sOFFSET \L\KBARY \R\QBARX \*\VBARBOTTOM \0\/YREF \6\4YLENGTH \;\:YMIN \A\@YMAX \\EYLABEL \\XREF \\XLENGTH \\XMIN \$\#XMAX \)XWIDTHmf]a]g]m]s 0]&]f0XLABEL 0]a]l0LABEL1 0]g]r0LABEL2 0]m]x0LABEL3
^^^^&^1^;^?^U^k/H^^tl9^HOUSEKEEP^0^ 0
^$L"X"FFFFFFFFFFFFFFFF^, 0
^.L"Y"FFFFFFFFFFFFFFFF^6 0
^9L"Z"FFFFFFFFFFFFFFFF^I^P]N^M00^SX^^f]^c00^u]g]&^y0]NV X 0\Zho]l X Xl]s]&l X\l
!y\*l%"6@\l3"R`\0lB"5plF0\\*\\0]a\A9lHLABEL

\Xm1]&m5mP\im\imc 0o#mtmynn 0]&mx0X mtm~Y1 mynY2 nn
Y3nn5nZn~nmt]:n)nn-]: 0n?my\tnMnDnQ\t 0ndn\tnrnhnv\t 0on\too
o,pZqCqcqxrrvQvUvyww4wKwdxxx4xTyZyf\XpU]:o=o[p3\]oToMoX\XoQ 0 X\cpo|p!ojp\tou\]oy 0\tp\]p P\tp,\]p0 Xp7pF\c\;	\;\c	\$pj
\ppqqpnpu P]: 0q(\\*\$\$]:9qX_LABEL


qJ\6\;9qLLABEL		qi\t9qkLABELr 0r@:A\XvG]:rr9rVssv#r"\*]r/r&q}] 0\nrOrHrS\XrL 0 X\Lre\ro
\$s
ssrys\Xr}0P0\G\*\]s(\iv0sHsMs1s4sD0s3W(I0Ss=\GsA00sG)sQvs[\*\tsf\n\]sutt\u
tatetvu	 0tdT(A1)W(Sto\Rts 0t]N\] 0u
)uuu)u.u?uD 0uW(Iu]\] 0u,)P	\L\G 0uAV	\$
uTuXuguk 0uVW(S0)P	\L\R 0ujV\Guyv	\$
v\Ru} 0v-\G]v:v1v>] 0vM 0vPT(A0)@;@Av_\*]vlvcvp] 0] w]&\iww,]&\i]&w1 0w>] ]&wB 0\XwZ]\iwmx]\i]w} 0x\X]x 0] x*]N\ix=xM]N\i]NxQ 0x^] ]Nxb 0xkH\\*\\0\$]]N]]&9xmLEGEND

yc9yeHOUSEKEEP
DEFINE PLOT STACKED_BAR
DECLARE X_REF, X_LENGTH, X_MIN, X_MAX, X_WIDTH
DECLARE Y_REF, Y_LENGTH, Y_MIN, Y_MAX, Y_LABEL
DECLARE BAR_Y, BAR_X, BAR_BOTTOM
DECLARE CNT, J_TEMP, K, KOUNT, OFFSET
DECLARE VECTOR Y_VALUE, Y_MX, COLOR

DECLARE STRING STNG
DECLARE STRING VECTOR L_LABEL, X_LABEL, HATCH
ENTRY 0 (X_LABEL : STRING,
         LABEL_1 : STRING,
         LABEL_2 : STRING,
         LABEL_3 : STRING)
BEGIN
    PLOT HOUSEKEEP 0
    PRINT "S(M 1(AH150L50S100)2(AH150L45S66)3(AH170L75S66))"
	    PRINT "L(A1)"
    PRINT "L""X""FFFFFFFFFFFFFFFF"
    PRINT "L""Y""FFFFFFFFFFFFFFFF"
    PRINT "L""Z""FFFFFFFFFFFFFFFF"
    HATCH(1) = "X"   COLOR(1) = 1   L_LABEL(1) = LABEL_1
    HATCH(2) = "Y"   COLOR(2) = 2   L_LABEL(2) = LABEL_2
    HATCH(3) = "Z"   COLOR(3) = 3   L_LABEL(3) = LABEL_3
"    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, Y_LABEL)
LLABEL
        IF LENGTH(L_LABEL(CNT)) NE 0 THEN
            KOUNT = KOUNT + 1
END
ENTRY 1 (X : STRING, Y1, Y2, Y3)
BEGIN
    X_LABEL(SIZE(X_LABEL) + 1) = X
    Y_VALUE(SIZE(Y_VALUE) + 1) = Y1
    Y_VALUE(SIZE(Y_VALUE) + 1) = Y2
    Y_VALUE(SIZE(Y_VALUE) + 1) = Y3
END
ENTRY 2
BEGIN
 XLABEL
    BEGIN
        J_TEMP =  (CNT - 1) * 3
&        K = Y_VALUE(J_TEMP + 1) + Y_VALUE(J_TEMP + 2) + Y_VALUE(J_TEMP + 3)
        IF K GT Y_MAX THEN
            Y_MAX = K
    END
    X_WIDTH = X_LENGTH / ((2 * SIZE(X_LABEL)) + 1)
    PLOT X_LABEL 0 (X_REF, Y_REF, X_WIDTH, X_WIDTH, X_LABEL)
    PLOT LABEL 3 (Y_MIN, Y_MAX)
    PLOT LABEL 8 (Y_VALUE)
    PRINT "@:A"
 XLABEL
    BEGIN
        Y_MX(SIZE(Y_MX) + 1) = Y_REF
        OFFSET =  (CNT - 1) * 3
        BAR_X = X_REF + X_WIDTH * (((CNT - 1) * 2) + 1)
        BAR_Y = Y_REF
        INCR J_TEMP FROM 1 TO KOUNT
        BEGIN
            PRINT "W(I0S", LY(BAR_Y - 1), ")"
            IF Y_VALUE(OFFSET + J_TEMP) LT Y_REF THEN
	            BEGIN
                BAR_BOTTOM = BAR_Y
"                BAR_Y = BAR_Y - (Y_REF - Y_VALUE(OFFSET + J_TEMP))
                 PRINT "P", LXY(BAR_X, BAR_Y), "V", RX(X_WIDTH)
	(                PRINT "T(A1)W(S", LY(BAR_BOTTOM - 1), QUOTE(HATCH(J_TEMP)), ")"
%                PRINT "W(I", CVT(COLOR(J_TEMP)), ")P", LXY(BAR_X,BAR_Y),

		    "V", RX(X_WIDTH)
#                PRINT "W(S0)P", LXY(BAR_X,BAR_BOTTOM), "V", LY(BAR_Y)
                PRINT RX(X_WIDTH), LY(BAR_BOTTOM - 1)
            END
        END
        Y_MX(SIZE(Y_MX) + 1) = BAR_Y
    END
    PRINT "T(A0)@;@A"
    Y_MX(SIZE(Y_MX) + 1) = Y_REF
&    STNG = L_LABEL(KOUNT)   L_LABEL(KOUNT) = L_LABEL(1)   L_LABEL(1) = STNG
$    CNT = COLOR(KOUNT)     COLOR(KOUNT) = COLOR(1)       COLOR(1) = CNT
%    STNG = HATCH(KOUNT)     HATCH(KOUNT) = HATCH(1)       HATCH(1) = STNG
&    PLOT LEGEND 3 (X_REF,Y_REF,X_LENGTH,Y_LENGTH,X_WIDTH,Y_MX,HATCH,COLOR,
	L_LABEL)
    PLOT HOUSEKEEP 2
END
END_PLOT