File: 3-3-12.mp

package info (click to toggle)
texlive-lang 2014.20141024-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,003,116 kB
  • ctags: 12,320
  • sloc: perl: 42,934; xml: 18,105; makefile: 4,433; ansic: 2,845; sh: 2,631; python: 1,398; ruby: 674; awk: 636; lisp: 603; java: 159; sed: 142
file content (23 lines) | stat: -rw-r--r-- 483 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
input graph
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
draw begingraph(2.5in,1.75in);
setrange(origin,(100,100));
numeric p[]; path r;
for j := 0 step 10 until 100:
  p[j]:=0; endfor
def check(expr age) =
 if age < 100:
   xage:=round(age/10) * 10;
   p[xage]:=p[xage] + 1; fi
enddef;
gdata ("ages.dat",y,
  check((scantokens y1)););
r:=(0,0) for j := 0 step 10  until 100:
   --(j,p[j]) endfor --(100,0);
gfill r -- cycle withcolor blue;
frame.llft;
endgraph;
endfig;
end;