Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - datatrieve/vt100/bar_average.cdd-plot
There are 4 other files named bar_average.cdd-plot in the archive. Click here to see a list.
{\Eie\\]^Z0\K\J0XLABEL0\@\P0YLABEL\"\DINDEX\1\&\(VALUESP\\5\7COUNTSP0\0\STRINGS
0\E]0STNG]]VALUE]]2]]z^)\@]!]\]7]C^^ \"\@^]
\"\@^3^M\1\@^C^Q\1\@ 0_n^^___i\@^o\"^y_\"\@_	_\"\@\1\@_' \E\K\\"9_)DRAW_BAR_f9_hDRAW_BAR
DEFINE PLOT BAR_AVERAGE
DECLARE STRING VECTOR STRINGS
DECLARE REAL VECTOR VALUES, COUNTS
DECLARE INDEX
DECLARE STRING X_LABEL, Y_LABEL
ENTRY 0 (X_LBL : STRING, Y_LBL : STRING)
    BEGIN
		X_LABEL = X_LBL
		Y_LABEL = Y_LBL
    END
ENTRY 1 (STNG : STRING, VALUE)
    BEGIN
	INDEX = SEARCH (STNG, STRINGS)
	IF INDEX EQ 0
	    INDEX = SIZE (STRINGS) + 1

	STRINGS (INDEX) = STNG
	VALUES (INDEX) = VALUES (INDEX) + VALUE
	COUNTS (INDEX) = COUNTS (INDEX) + 1
    END
ENTRY 2
    BEGIN

	INCR INDEX OVER VALUES
	    VALUES (INDEX) = VALUES(INDEX) / COUNTS(INDEX)
	PLOT DRAW_BAR 0 (X_LABEL, Y_LABEL, STRINGS, VALUES)
		PLOT DRAW_BAR 2
    END
END_PLOT