Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - datatrieve/gigi/draw_bar.cdd-plot
There are 4 other files named draw_bar.cdd-plot in the archive. Click here to see a list.
{]3"ie]Ua)j` 0]9]80Y_LABEL 0]-]>0X_LABEL \o]2START_BAR \u\tX_POS \z\yY_POS ]\ZERO ]]SCALE_VAL ]]
INDEX]]STOP]]NEXT]]CNT]"]3MAXSTR ]']&DIAG \@],SHADOW2\F\DXAXIS\L\JYAXIS \R\PXLENGTH \X\VYLENGTH \^\\MINVALUE \d\bMAXVALUE \i\hWIDTH \!\nSHADOW \0\& \'VALUESP \
^^'^8Y`!`5`J]9]?\L^"R`\F^"6@\R^#	"5p]3]E
]J]^y	\!]]P]6]&\
]@J\
_]`_n_{_g_r]_k x t\L`!``]"`
 0]9` 0` \X`+	\!\^`?
\!`N`_`u`R`\\! x\d`n
\L`r!\da
\Laa
aa	a P\! 0jU
a1bazbBbVb[cc%c;chcvdiyjjPa-9a/HOUSEKEEPa50\@\F\L\R]9]39a7LABEL	b
bH\z9bJLABEL]bl\!bvc\0]
\!]c\09cLABEL
]c4]c8 xc@cS]cI\0
]c]\0
]crc{d
 0d
T(B)d 0dT(B)[10,2]]d*]il]d. 0	d8dOeee5eZfRfwg:hMhUig]dG]dK 0\od_\@dh\ddy
dod}dl] P 0\ue\0]
\ie,\de0
 Xe9eI\z\F\z\Fe^f\ien\zex\0]
f
f.\if$f\z\0]
\if=\zfH\0]
fVfc\if`\ifm\if{gg)\zg\0]
]'g\i]'\ig?gLgb]'gI]-g[\zg_ P]-\zgugzhhh"h'h2h7hH 0gwP	\o]- 0h(B)W(I1S1)P	\o\u 0h$V(BW(E))	\d
 0h4(B)V
\i]'0hKW(S0)P(E)V(E)(E)hZhfvi\@h\di
iii] P ii" pi+\
i5i9iOiS 0i8P	\oiH\FiL! 0iRW(I5)ti]\
iv 0ixT(E)jjH]j\0
jjjC 0jp	j/j<j%j3\@\L!v@\Fj@!^ 0jFT"(More...)"jM9jOHOUSEKEEPkjdkk]jm\!\
kDEFINE PLOT DRAWBAR
DECLARE STRING VECTOR STRINGS
DECLARE REAL VECTOR VALUES, SCALE_VALUES
	(DECLARE X_AXIS, Y_AXIS, X_LENGTH, Y_LENGTH, MIN_VALUE, MAX_VALUE, WIDTH, SHADOW
	+DECLARE X_POS, Y_POS, ZERO, SCALE_VAL, INDEX, STOP, NEXT, CNT, MAX_STR, DIAG, SHADOW2
	DECLARE START_BAR
DECLARE STRING Y_LABEL, X_LABEL
	! Get data points

ENTRY 0 (X_LBL: STRING,
		 Y_LBL: STRING,

	 STRS : STRING VECTOR,
	 VALS : REAL VECTOR)
    BEGIN
		X_LABEL = X_LBL
	X_AXIS = 100
	X_LENGTH = 600
	Y_AXIS = 360
	Y_LENGTH = 350
		Y_LABEL = Y_LBL

	INCR CNT OVER STRS
	    BEGIN
		STRINGS (CNT) = STRS (CNT)
		VALUES (CNT)  = VALS (CNT)
		IF LENGTH (STRINGS(CNT)) GT MAX_STR
		    MAX_STR = LENGTH (STRINGS (CNT))
	    END
	IF MAX_STR * 6 + 5 GT X_LENGTH / 9
	    BEGIN
		DIAG = 1
		X_LABEL = " "
	    END
IN (VALUES)
(VALUES)

	IF SIZE (VALUES) GE 6
	    THEN WIDTH = X_LENGTH / 13
	    ELSE WIDTH = X_LENGTH / (2 * SIZE(VALUES) + 1)
    END
ENTRY 2
    BEGIN
		PLOT HOUSEKEEP 0
#	PLOT LABEL 0 (X_AXIS, Y_AXIS, X_LENGTH, Y_LENGTH, X_LABEL, Y_LABEL)
	IF MIN_VALUE GT 0 THEN MIN_VALUE = 0
        PLOT LABEL 3 (MIN_VALUE, MAX_VALUE)
	PLOT LABEL 15 (ZERO)
	INCR CNT OVER VALUES
	    SCALE_VALUES (CNT) = VALUES (CNT)
	PLOT LABEL 8 (SCALE_VALUES)
		STOP = NEXT + 6
	IF STOP GT SIZE (SCALE_VALUES)
	    STOP = SIZE (SCALE_VALUES)
	INDEX = 0
	IF DIAG EQ 0

	    THEN PRINT "T(B)"
	    ELSE PRINT "T(B)[10,2]"
	INCR NEXT FROM NEXT + 1 TO STOP
	    BEGIN

		INDEX = INDEX + 1
		X_POS = X_AXIS + WIDTH * (2 * INDEX - 1)
		Y_POS = SCALE_VALUES (NEXT)
		SHADOW = WIDTH / 3
IS THEN

		    ZERO = Y_AXIS
		IF SHADOW GE ZERO - SCALE_VALUES (NEXT) THEN
		   IF SHADOW GE SCALE_VALUES (NEXT) - ZERO THEN
			SHADOW = ZERO - SCALE_VALUES (NEXT)
		IF SHADOW < 0 THEN SHADOW = - SHADOW
		IF ZERO LT SCALE_VALUES (NEXT)
		    THEN SHADOW2 = - SHADOW
		    ELSE SHADOW2 = SHADOW
			IF SHADOW2 > 0
		    THEN START_BAR = ZERO - 2
		    ELSE START_BAR = ZERO
		PRINT "P", LXY (X_POS, START_BAR), "(B)W(I1S1)P",
, YPOS),
		    "V(BW(E))", RX (WIDTH), "(B)V", RXY (SHADOW, SHADOW2),
(E)(E)"
		IF DIAG EQ 0
		    THEN X_POS = X_AXIS + (WIDTH * (2 * INDEX - .5)) - 4
			     * LENGTH (STRINGS (NEXT))
		PRINT "P",LXY (X_POS, Y_AXIS + 15), "W(I5)t",
		    QUOTE (STRINGS(NEXT))
	    END
	PRINT "T(E)"
	IF NEXT LT SIZE (SCALE_VALUES)
	    PRINT "p", LXY (X_AXIS + X_LENGTH - 90, Y_AXIS + 60),

		"T""(More...)"""
		PLOT HOUSEKEEP 2
    END
! Re-sort data by height and replot
ENTRY 3
    BEGIN
	NEXT = 0
	SORT DESC (VALUES, STRINGS)
		PLOT DRAW_BAR 2
    END
END_PLOT