Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
00100		SUBROUTINE TAXIS(SX,SY,XIN,IP,LP,NPERYR,XINC)
00200	C
00300	C TAXIS IS A GENERAL TIME AXIS PLOTTING ROUTINE
00400	C
00500	C A HORIZONTAL AXIS IS GENERATED AND APPROPRIATELY
00600	C LABELLED FOR MONTHLY, QUARTERLY, SEMI-ANNUAL, AND ANNUAL
00700	C DATA
00800	C ARGUMENTS ARE:
00900	C	SX - X COORDINATE OF BOTTOM OF FRAME (CF. XYAXIS)
01000	C 	SY - Y COORDINATE OF BOTTOM OF FRAME
01100	C	XIN - LENGTH OF X AXIS
01200	C	IP - INITIAL DATA PERIOD (IN YYYYPP FORMAT)
01300	C	LP - LAST DATA PERIOD (IN YYYYPP FORMAT)
01400	C	NPERYR - DATA FREQUENCY (E.G.  4, 6, OR 12)
01500	C
01600		DIMENSION IDMON(12),IDQTR(4),IDSMI(2)
01650		COMMON/YOUT/YZ,YQ
01700		DATA IDMON/'JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG',
01800	     .	'SEP','OCT','NOV','DEC'/
01900		DATA IDQTR/' I ','II ','III','IV '/
02000		DATA IDSMI/' I ','II '/
02050		LOGICAL TIC
02100	C
02200	C
02300	C TICK MARKS ARE PUT IN OF VARIOUS SIZES
02400		DIMENSION YTCK(0/1)
02500		DATA YTCK/.08,.1/
02600	C
02610		XXIN=XIN
02700		NPNTS=KINDEX(LP,IP,NPERYR)
02800	50	XINC=XXIN/FLOAT(NPNTS-1)
02850		TIC=.FALSE.
02900		IF (NPERYR .EQ. 4 .OR. NPERYR .EQ. 12) TIC=.TRUE.
02950		Z=1.
02975		IF (TIC) Z=4.
03000		IF (XINC*Z .GE. .4) GO TO 10
03100		XXIN=XXIN+.5
03110		IF (XXIN .GT. XIN*1.5) GO TO 5000
03120		GO TO 50
03200	10	IF (XINC *Z .LE. 1.75) GO TO 20
03300		XXIN=XXIN-.5
03310		IF (XXIN .LT. 2.) GO TO 5000
03320		GO TO 50
03400	20	XIN=XINC*FLOAT(NPNTS-1)
03500		NPHI=Z+.3
03700	C
03800	C DRAW THE AXIS
03900		XA=SX+.75-.1
04000		YA=SY+.75
04100		XC=XA
04200		XQ=XA+XIN+.2
04300		CALL PLOT(XA,YA,3)
04400		CALL PLOT(XQ,YA,2)
04500		CALL PLOT(XA,YA,2)
04600		XA=XA+.1
04650		N=0
04700	C
04800	C START TO LOOP FOR LABELS AND TICK MARKS
04900	5	DO 30 I=1,NPHI
05000		XX=XA+(I-1)*XINC
05100		IF (I .LT. NPHI .AND. .NOT. TIC) GO TO 30
05200		CALL PLOT(XX,YA,3)
05300		CALL PLOT(XX,YA-YTCK(I/NPHI),2)
05400		IF (I .NE. NPHI) GO TO 30
05500		N=N+NPHI
05600		KN=KYRPER(N,IP,NPERYR)
05700		KPER=MOD(KN,100)
05800		YEAR=MOD(KN,10000)/100
05900		XD=XX-.1
06000		YD=YA-.21
06100		CALL NUMBER(XD,YD,.09,YEAR,0.,-1)
06200		IF (NPERYR .LT. 4) GO TO 30
06300		XE=XD
06400		YE=YD-.12
06500		IJ=(NPERYR-1)/4+1
06600		GO TO (25,27,29),IJ
06700	C
06800	C NOT MONTHLY, QUARTERLY, OR SEMI-ANNUAL
06900		FKPER=KPER
07000		CALL NUMBER(XD,YE,.08,FKPER,0.,-1)
07100		GO TO 30
07200	C QUARTERLY
07300	25	CALL SYMBOL(XE,YE,.08,IDQTR(KPER),0.,3)
07400		GO TO 30
07500	C
07600	C SEMI ANNUAL
07700	27	CALL SYMBOL(XE,YE,.08,IDSMI(KPER),0.,3)
07800		GO TO 30
07900	C 
08000	C MONTHLY
08100	29	CALL SYMBOL(XE,YE,.08,IDMON(KPER),0.,3)
08200	30	CONTINUE
08400		 XA=XA+Z*XINC
08500	C
08600	C SEE IF DONE
08700		IF (KN .LT. LP) GO TO 5
09400		RETURN
09410	5000	TYPE 5001,XXIN
09420	5001	FORMAT('  TIME AXIS MUST BE OF LENGTH :',F5.1 )
09425		PAUSE 'IF THIS IS OKAY '
09427		XIN=XXIN
09428		GO TO 50
09500		END
09600	C
09700	C:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
09800	C
09900		FUNCTION KYRPER(KIN,INITOB,NPERYR)
10000		LY=INITOB/100+(KIN-1)/NPERYR
10100		LP=MOD(INITOB,100)+MOD(KIN-1,NPERYR)
10200		IF (LP .LE. NPERYR) GO TO 10
10300		LP=LP-NPERYR
10400		LY=LY+1
10500	10	KYRPER=LY*100+LP
10600		RETURN
10700		END