Apple Color Plotter: Business BASIC Chart Maker III (5 of 5)

This article has been archived and is no longer updated by Apple.
50091 m$="command to use it as the Plotter.":pv=22:GOSUB 352
50092 m$="(Press Any Key to Continue)":pv=23:GOSUB 350
50098 GET a$
50099 GOSUB 72:GOTO 50000
50100 XP=XLEFT:YP=YBOT:GOSUB 51110:YP=YTOP-50:GOSUB 51111:
     XP=XLEFT+XLEN+1:GOSUB 51111:YP=YBOT:GOSUB 51111:XP=XLEFT:
     GOSUB 51111:RETURN:REM The Box
50200 REM Graph Title
50201 IF LEN(GRTIT$)=0 THEN RETURN
50202 ms$=grtit$
50205 si=30:IF LEN(ms$)<29 THEN si=50:GOTO 50209
50206 IF LEN(ms$)<36 THEN si=45:GOTO 50209
50207 IF LEN(ms$)<41 THEN si=37:GOTO 50209
50209 GOSUB 51150
50210 XP=XLEFT+(INT(XLEN/2)):YP=YTOP-25
50215 hpgl$="PL ":GOSUB 51000:hpgl$="PL"+CHR$(8):GOSUB 51000
50220 GOSUB 51110:GOSUB 53420:GOSUB 51140:RETURN
51000 PRINT#1;HPGL$+CHR$(3):RETURN
51001 PRINT#1;HPGL$:RETURN
51100 HPGL$="PS"+STR$(PN)+";":GOSUB 51000:RETURN:REM Get pen
51110 HPGL$="MA"+STR$(XP)+","+STR$(YP):GOSUB 51000:RETURN:
     REM Move X-Y
51111 HPGL$="DA"+STR$(XP)+","+STR$(YP):GOSUB 51000:RETURN:
     REM Draw to XY
51112 hpgl$="PM"+STR$(X):GOSUB 51000:RETURN:REM Plot symbol
51120 HPGL$="PU;":GOSUB 51000:RETURN:REM Pen Up
51130 HPGL$="PD;":GOSUB 51000:RETURN:REM Pen Down

51140 HPGL$="PL"+MS$:GOSUB 51000:RETURN
51150 HPGL$="LS"+STR$(SI):GOSUB 51000:RETURN
51160 GOSUB 51110:HPGL$="PL":GOSUB 51001
51161 IF N=INT(N) THEN PRINT#1; USING"######";N;:GOTO 51169
51165 PRINT#1; USING"####.#";n;
51169 hpgl$=CHR$(3):GOSUB 51001:RETURN
51170 GOSUB 51110:HPGL$="XT;":GOSUB 51000:HPGL$="YT;":
     GOSUB 51000:RETURN
51175 HPGL$="XT;":GOSUB 51000:RETURN
51176 HPGL$="YT;":GOSUB 51000:RETURN
51180 HPGL$="TL.15,.15;":GOSUB 51000:RETURN
51190 PRINT#1,CHR$(27)+".M:";:RETURN
51195 HPGL$="SM"+RIGHT$(STR$(SYMBOL),1)+";":GOSUB 51000:
     GOSUB 51130:RETURN
51200 HPGL$="sp0;":GOSUB 51000:FOR I=1 TO 5000:NEXT:RETURN:
     REM Put pen in stall
51210 HPGL$="DI1;":GOSUB 51000:RETURN
51300 PRINT#1, USING"####.#";N:RETURN
53000 YBOTT=YBOT-125:si=25:GOSUB 51150
53001 XP=INT((XLEFT+(XINCREMENT/2))):YP=YBOT-1:GOSUB 51110:
     YP=YP-40:GOSUB 51111
53002 YP=YBOTT:J=GC1:GOSUB 53340
53005 J=XRANGE:GOSUB 53390
53010 YP=YBOTT:J=GC2:GOSUB 53340
53020 IF NOKOLS=2 THEN RETURN
53025 OFFSET=0:IF GC1>1 THEN OFFSET=GC1-1:ELSE OFFSET=0

53030 NOKOLS&=CONV&(NOKOLS):IF(NOKOLS& MOD 2)=0 THEN DXR=4:
     ELSE DXR=3
53040 INCR=INT(NOKOLS/DXR)
53041 IF NOKOLS=4 THEN GOTO 53330
53042 IF NOKOLS=5 THEN GOTO 53060
53043 IF NOKOLS=3 THEN GOTO 53060
53050 IF DXR=3 THEN 53330
53060 IF NOKOL<>3 THEN J=(GC1+INCR)-OFFSET:GOSUB 53390:
     YP=YBOTT:J=J+OFFSET:GOSUB 53340
53070 IF NOKOL<>3 THEN J=(GC2-INCR)-OFFSET:GOSUB 53390:
     YP=YBOTT:J=J+OFFSET:GOSUB 53340
53080 J=GC1+(INT(NOKOLS/2)+0):J=J-OFFSET:GOSUB 53390:
     YP=YBOTT:J=J+OFFSET:GOSUB 53340
53085 IF NOKOLS=6 THEN J=3:GOSUB 53390:YP=YBOTT:J=J+OFFSET:
     GOSUB 53340
53090 RETURN
53330 J=(GC1+INCR)-OFFSET:GOSUB 53390:YP=YBOTT:J=J+OFFSET:
     GOSUB 53340
53335 J=(GC2-INCR)-OFFSET:GOSUB 53390:YP=YBOTT:J=J+OFFSET:
     GOSUB 53340
53339 RETURN
53340 GOSUB 51110:IF LEN(C$(J))=0 THEN GOSUB 53380:GOTO 53360
53341 MS$=C$(J)
53360 GOSUB 53400
53370 GOSUB 51140:RETURN
53380 MS$=+STR$(J):RETURN
53390 J=INT(J):
     XP=INT((J*XINCREMENT)+(XLEFT-(INT(XINCREMENT/2)))):
     YP=YBOT-1:GOSUB 51110:YP=YP-40:GOSUB 51111

53399 RETURN
53400 IF J=GC1 THEN RETURN
53420 BACKUP=((INT(LEN(MS$)/2)))
53425 IF backup<.5 THEN GOTO 53460
53430 FOR j9=1 TO backup
53440 hpgl$="PL"+CHR$(8):GOSUB 51000
53450 NEXT
53460 RETURN
57000 pv=23:ph=20:m$="Enter New 'Device Name' :  ":GOSUB 352
57010 ph=46:sl=15:GOSUB 101:IF a$=CHR$(27) THEN GOTO 57099
57020 IF LEN(b$)=0 THEN PRINT CHR$(7);:GOTO 57010
57030 IF LEFT$(b$,1)<>"."  THEN b$="."+b$
57040 plr$=b$
57050 GOSUB 9001
57099 GOSUB 73:RETURN

Published Date: Feb 18, 2012