File: test3.p

package info (click to toggle)
libpgplot-perl 1%3A2.21-6
  • links: PTS, VCS
  • area: contrib
  • in suites: stretch
  • size: 316 kB
  • ctags: 31
  • sloc: perl: 679; ansic: 453; makefile: 7
file content (58 lines) | stat: -rwxr-xr-x 551 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/local/bin/perl

use PGPLOT;

print "\n\nTesting histogram routines...\n\n";

print "PGPLOT module version $PGPLOT::VERSION\n\n";

pgqinf("VERSION",$val,$len);
print "PGPLOT $val library\n\n";

$i=0; @data=();
while(<DATA>){
  $i++;
  chop;
  $data[$i-1] = $_;
}

$dev = "?" unless defined $dev;

pgbegin(0,$dev,1,1);

pgscf(2);
pgslw(4);
pgsch(1.6);

pgsci(6);

pgsci(7);

pghist($i,\@data,0,10,10,2);

pglabel("Data Value","Number of data items","Test histogram");

$len = 1; # -w fudge

pgend;

__DATA__
1
1
2
3
4
7
3
5
7
3
5
6
2
2
2
2
1
6
7