blob: 469508396201011482f0b22419e50a3577f13b0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
% --- start of displayed preamble in the book ---
input graph
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
draw begingraph(2.5in,1.5in);
numeric p[];
path r;
for j := 0 upto 100:
p[j]:=0;
endfor
gdata ("ages.dat",y, age:=(scantokens y1);
p[age]:=p[age] + 1;);
r:=(0,0)
for j := 1 upto 100: --(j,p[j]) endfor;
gdraw r;
frame.llft;
endgraph;
endfig;
end;
|