Google
 

Trailing-Edge - PDP-10 Archives - BB-AI48A-BM - datatrieve/vt240/draw_bar.cdd-plot
There are 4 other files named draw_bar.cdd-plot in the archive. Click here to see a list.
G-!UGOK#TW 0G3G20Y_LABEL 0G'G80X_LABEL FoG,START_BAR FuFtX_POS FzFyY_POS GFZERO GGINDEX GG
STOPGGNEXTGGCNTGGMAXSTR G!G>DIAG F@G&SHADOW2FFFDXAXISFLFJYAXISFRFPXLENGTHFXFVYLENGTHF^F\MINVALUE FdFbMAXVALUE FiFhWIDTH F!FnSHADOW F0F& F'VALUESP F
F@Gp!yFLH"R`FFH"6@FRH"5pG-G?
GDGF!GGJGII0IGI F
GI:IDF
IhIuIaIlGIe x tFLIy!JJ	GI| 0G3J 0J FXJ%	F!F^J9	F!JHJYJoJLJVF! xFdJh
FLJl!FdJ
FLKKKKK
 PF! 0TL
K+LKzL<LPLUMMM5MbMpNSrSvTHK'9K)HOUSEKEEPK/0F@FFFLFRG3G-9K1LABELLLFXL	FXL	L!FXF^9L#LABEL		LBFz9LDLABELGLfF!LpMF0GF!GM
F09M
LABELGM.GM2xM:MMGMCF0GMWF0GMlMuNN
0NGN#GSeGN' 0	N1NHNzOO.OSPIPpQ3RFRNS`GN@GND 0FoNXF@NaFdNr
NhNvNeG P 0FuO
F0GFiO%
FdO)
 XO2OBFzFFFzFFOWO{FiOg
FzOqF0GPP$FiP
PFzF0GFiP3
FzP>F0GPNP[FiPX
FiPe
Fi
PtQQ"FzQF0GG!QFi
G!Fi
Q8QEQ[G!QBG'QTFzQX PG'FzQnQsRR
RR R+R0RA 0QpP	FoG' 0R(B)W(I(C)S1)P	FoFu 0RV(BW(E))	Fd
 0R-(B)V
FiG!
0RDW(S0)P(E)V(E)(E)RSRoRoSF@RxFdS	
RS P SS pS$F
S.S2SHSL 0S1P	FoSAFFSE! 0SKW(I(W))tSVF
So 0SqT(E)S{T?GTF0TTT; 0Tp	T'T4TT+F@FL!v@FFT8!^ 0T=T"(More...)"TD9TFHOUSEKEEPU
T[UUGTeF!F
U9UDRAW_BARDEFINE PLOT DRAW_BAR
DECLARE STRING VECTOR STRINGS
DECLARE REAL VECTOR VALUES, SCALED_VALUES
	(DECLARE X_AXIS, Y_AXIS, X_LENGTH, Y_LENGTH, MIN_VALUE, MAX_VALUE, WIDTH, SHADOW
&DECLARE X_POS, Y_POS, ZERO, 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
	    SCALED_VALUES (CNT) = VALUES (CNT)
	PLOT LABEL 8 (SCALED_VALUES)
		STOP = NEXT + 6
	IF STOP GT SIZE (SCALED_VALUES)
	    STOP = SIZE (SCALED_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 = SCALED_VALUES (NEXT)
		SHADOW = WIDTH / 3
IS THEN

		    ZERO = Y_AXIS
		IF SHADOW GE ZERO - SCALED_VALUES (NEXT) THEN
		   IF SHADOW GE SCALED_VALUES (NEXT) - ZERO THEN
			SHADOW = ZERO - SCALED_VALUES (NEXT)
		IF SHADOW < 0 THEN SHADOW = - SHADOW
		IF ZERO LT SCALED_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(I(C)S1)P",
OS, 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(I(W))t",
		    QUOTE (STRINGS(NEXT))
	    END
	PRINT "T(E)"
	IF NEXT LT SIZE (SCALED_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