Debian Codegraph @

t/t1.t

raw symbols SCIP
1 use strictscip-perl cpan PGPLOT 2.36 strict/; use warningsscip-perl cpan PGPLOT 2.36 warnings/;
2 use Test::Morescip-perl cpan PGPLOT 2.36 Test/More/;
3 use Configscip-perl cpan PGPLOT 2.36 Config/;
4 # Stop f77-linking causing spurious undefined symbols (alpha)
5 $ENVscip-perl cpan PGPLOT 2.36 main/`%ENV`.{'PERL_DL_NONLAZY'}=0 if $Configscip-perl cpan PGPLOT 2.36 main/`%Config`.{'osname'} eq "dec_osf";
6 requirescip-perl cpan PGPLOT 2.36 main/require(). PGPLOT;
7
8 diag <<EOF if $^Oscip-perl cpan PGPLOT 2.36 main/`$^O`. =~ /mswin32/i;
9 NOTE - Win32 only: If /XSERVE doesn't work properly then
10 try /PNG (assuming libpng.dll is in your path) with one test-file.
11 Then view the output '.png' file.
12 EOF
13
14 my $dev = $ENVscip-perl cpan PGPLOT 2.36 main/`%ENV`.{PGPLOT_DEV} || '/NULL';
15 diagscip-perl cpan PGPLOT 2.36 main/diag(). "Using device '$dev' - set env var PGPLOT_DEV to change";
16
17 $ENVscip-perl cpan PGPLOT 2.36 main/`%ENV`.{PGPLOT_XW_WIDTH}=0.3;
18
19 #PGPLOT::set_debugging(1);
20 PGPLOT::pgbeginscip-perl cpan PGPLOT 2.36 PGPLOT/pgbegin().(0,$dev,1,1); # Open plot device
21
22 PGPLOT::pgscfscip-perl cpan PGPLOT 2.36 PGPLOT/pgscf().(2); # Set character font
23 PGPLOT::pgslwscip-perl cpan PGPLOT 2.36 PGPLOT/pgslw().(4); # Set line width
24 PGPLOT::pgschscip-perl cpan PGPLOT 2.36 PGPLOT/pgsch().(1.6); # Set character height
25
26 # Define data limits and plot axes
27
28 PGPLOT::pgenvscip-perl cpan PGPLOT 2.36 PGPLOT/pgenv().(0,10,-5,5,0,0);
29
30 PGPLOT::pglabelscip-perl cpan PGPLOT 2.36 PGPLOT/pglabel().("X","Y","Data"); # Labels
31
32 PGPLOT::pgsciscip-perl cpan PGPLOT 2.36 PGPLOT/pgsci().(5); # Change colour
33
34 my ($i, @x, @y) = 0;
35 while(<DATA>){
36
37 # Read data in 2 columns from file handle
38 # and put in two perl arrays
39
40 ($x[$i], $y[$i]) = splitscip-perl cpan PGPLOT 2.36 main/split().(' ');
41 $i++;
42 }
43
44 # Plot points - note how perl arrays are passed
45
46 PGPLOT::pgpointscip-perl cpan PGPLOT 2.36 PGPLOT/pgpoint().($i,\@x,\@y,17);
47 PGPLOT::pgendscip-perl cpan PGPLOT 2.36 PGPLOT/pgend().(); # Close plot
48
49 pass;
50 done_testing;
51
52 __DATA__
53 1 -4.5
54 2 -4
55 3 -3.2
56 4 -2.1
57 5 -1
58 6 0.3
59 7 1.2
60 8 2.4
61 9 2.9