12.07.2015 Views

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

williams-et-al-1983-apple-ii-computer-graphics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

126 APPLE II COMPUTER GRAPHICS670 X = 24 + I * SP%680 IF X < 280 THEN DRAW 11 AT X , 159690 NEXT I700 VTAB (21)710 PRINT " J F M A M J J A S 0 N D J F MA E A P A U U U E C 0 E A E AN B R R Y N L G P T V C N B R";720 VTAB (20)730 REM740 REM ********************750 REM * PLOT DATA POINTS *760 REM ********************770 REM780 HCOLOR = 7790 HPLOT 24, 160-DP(0) * SCL800 FOR I = 1 TO NP%-1810 X = 24 + I * SP%820 Y = DP (I) * SCL830 IF X > 279 THEN PRINT CHR$ ( 7) ;"CHART TOO WIDE" : GOTO 860 : REM (END )840 HPLOT TO X ,160-Y850 NEXT I860 END900 REM910 REM **************920 REM * DATA TABLE *930 REM **************940 REM950 DATA 15 , 18960 DATA 100,130 ,90,80 ,100,210,170 ,60,120,30 ,50,40,100, 80, 90Listing 11-3. Line graph.You may change the data plotted by changing the v<strong>al</strong>ues given in line960. The numbers on the vertic<strong>al</strong> axis will change accordingly, but will stillincrement by 20. The increment for the vertic<strong>al</strong> sc<strong>al</strong>e may be adju sted inline 520, but we will t<strong>al</strong>k more about that soon. The fi rst v<strong>al</strong>ue in line 950gives the number of data points to be plotted, and the second item indicatesthe horizont<strong>al</strong> spacing b<strong>et</strong>ween plots. Both those numbers may be<strong>al</strong>tered and the program will behave properly, except for the horizont<strong>al</strong>labels which remain fixed.After you have played for a while, l<strong>et</strong>'s look at some of the more interestingparts of this program.90 PRINT CHR$ ( 4) ; "BLOAD NUMBER TABLE, A$30W'100 POKE 232,0: POKE 233 ,3110 SCALE = 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!