// Draws a graph which is filled in below the line
// with a pattern. 
// Instead of plotting the points, we draw a polygon
// which contains all the points, then close it.

data  0,200,  2,198, 5,198,  7,196 
data  8,196, 10,195, 12,196, 14,195, 
data 17,196, 20,195, 22,193, 24,193
data 26,192, 28,191, 30,190, 34,188
data 36,186, 38,187, 42,186, 44,185 

dim points(22,2)
graph includexaxis=0,height=4,width=5

title$="Weight Loss\nTo Date\n" + DATE$
text string=title$, color=(100,0,0),size=18,boxed,H=70	

w$ = "Weight in Pounds"
text yaxis, string=w$

d$ = "Days on Diet"
text xaxis, string=d$

i=0
while read(0) 
 read points(i,0), points (i,1)  //day,weight
 i=i+1
wend

points (i,0) = points (0,0)    // return back to start
points (i,1) = points (i-1,1)  // at bottom of graph

shape filltype=hatch, hatch=cross, fillcolor=(255,0,0)
shape polypoints=points, polycount=i+1, polygon