Debian Codegraph @

t/t2.t

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 use strict; use warnings;
2 use Test::More;
3 use Config;
4 # Stop f77-linking causing spurious undefined symbols (alpha)
5 $ENV{'PERL_DL_NONLAZY'}=0 if $Config{'osname'} eq "dec_osf";
6 require PGPLOT;
7
8 my $dev = $ENV{PGPLOT_DEV} || '/NULL';
9
10 $ENV{PGPLOT_XW_WIDTH}=0.3;
11
12 note "Testing advanced point and line plot routines";
13
14 PGPLOT::pgbegin(0,$dev,1,1);
15
16 PGPLOT::pgscf(2); # Set label character font
17 PGPLOT::pgslw(4); # Set line width
18 PGPLOT::pgsch(1.6); # Set label character height
19
20 PGPLOT::pgenv(10.0,30.0,-2.0,6.0,0,0);
21
22 PGPLOT::pgsci(6);
23
24 PGPLOT::pglabel("X axis \\gP","Y axis \\gF","Top Label \\gW");
25
26 PGPLOT::pgsci(7);
27
28 my $i=-1;
29 our (@x, @y, @e, @x1, @x2, @y1, @y2);
30 while(<DATA>){
31 $i++;
32 ($x[$i], $y[$i]) = split(' ');
33 }
34 PGPLOT::pgline($i,*x,*y);
35
36 PGPLOT::pgsci(3);
37
38 for($i=0; $i<10; $i++) {
39 $x[$i] = $i+15;
40 $y[$i] = $i-1;
41 $e[$i] = 0.9;
42 $x1[$i] = $x[$i] - $e[$i];
43 $x2[$i] = $x[$i] + 2.0* $e[$i];
44 $y1[$i] = $y[$i] - 0.7* $e[$i];
45 $y2[$i] = $y[$i] + 0.3* $e[$i];
46 }
47
48
49 PGPLOT::pgpoint(10,\@x,\@y,14);
50 PGPLOT::pgerrx(10,\@x1,\@x2,*y,1);
51 PGPLOT::pgerry(10,*x,*y2,*y1,.1); # Note we can also pass globs
52 PGPLOT::pgsci(2);
53 PGPLOT::pgsah(1,30,0.5);
54 PGPLOT::pgarro(20,0,25,2);
55
56 PGPLOT::pgmtext('B', -2.0, 0.95, 1, "This is a test") if $^O ne 'freebsd'; # blows up for some reason
57
58 PGPLOT::pgsci(9);
59
60 PGPLOT::pgptxt(25,2,35,0,'This way...');
61
62 PGPLOT::pgqinf("CURSOR", my $ans, my $l);
•63 #if ($ans eq "YES") {
64 # diag "Entering interactive cursor test...\n";
65 # PGPLOT::pgsci(4);
66 # diag "Enter some points with the cursor, press 'x' when done\n";
67 # our (@xt, @yt);
68 # PGPLOT::pglcur(5, (my $n = 0),\@xt,\@yt);
69 # PGPLOT::pgsci(9);
70 # PGPLOT::pgpoint($n,*xt,*yt,20);
71 # for(@xt) { diag sprintf "%5.2f ",$_; }
72 # for(@yt) { diag sprintf "%5.2f ",$_; }
73 # PGPLOT::pgsci(2);
74 # PGPLOT::pgpoly($n,\@xt,\@yt);
75 #}
76
77 PGPLOT::pgiden();
78
79 PGPLOT::pgend();
80
81 pass;
82 done_testing;
83
84 __DATA__
85 17.000000000000 1.8515548576633
86 17.090909090909 1.8907204814559
87 17.181818181818 1.9295359694614
88 17.272727272727 1.9680015320877
89 17.363636363636 2.0061177764022
90 17.454545454545 2.0438854788985
91 17.545454545455 2.0813053106065
92 17.636363636364 2.1183775285123
93 17.727272727273 2.1551016548418
94 17.818181818182 2.1914761754610
95 17.909090909091 2.2274982964675
96 18.000000000000 2.2631637990568
97 18.090909090909 2.2984670235480
98 18.181818181818 2.3334009941233
99 18.272727272727 2.3679576705054
100 18.363636363636 2.4021282884047
101 18.454545454545 2.4359037344501
102 18.545454545455 2.4692748984585
103 18.636363636364 2.5022329570773
104 18.727272727273 2.5347695641881
105 18.818181818182 2.5668769479863
106 18.909090909091 2.5985479346970
107 19.000000000000 2.6297759289711
108 19.090909090909 2.6605548795749
109 19.181818181818 2.6908792486119
110 19.272727272727 2.7207439885008
111 19.363636363636 2.7501445190802
112 19.454545454545 2.7790766916671
113 19.545454545455 2.8075367289695
114 19.636363636364 2.8355211378950
115 19.727272727273 2.8630266031458
116 19.818181818182 2.8900498792887
117 19.909090909091 2.9165877047968
118 20.000000000000 2.9426367619456
119 20.090909090909 2.9681937015030
120 20.181818181818 2.9932552421733
121 20.272727272727 3.0178183437014
122 20.363636363636 3.0418804415552
123 20.454545454545 3.0654397220766
124 20.545454545455 3.0884954112766
125 20.636363636364 3.1110480486517
126 20.727272727273 3.1330997194487
127 20.818181818182 3.1546542241000
128 20.909090909091 3.1757171712601
129 21.000000000000 3.1962959901364
130 21.090909090909 3.2163998676902
131 21.181818181818 3.2360396257475
132 21.272727272727 3.2552275607789
133 21.363636363636 3.2739772736228
134 21.454545454545 3.2923035164850
135 21.545454545455 3.3102220796353
136 21.636363636364 3.3277497309551
137 21.727272727273 3.3449042097046
138 21.818181818182 3.3617042642169
139 21.909090909091 3.3781697143502
140 22.000000000000 3.3943215153121
141 22.090909090909 3.4101818004154
142 22.181818181818 3.4257738855463
143 22.272727272727 3.4411222258316
144 22.363636363636 3.4562523231832
145 22.454545454545 3.4711905905443
146 22.545454545455 3.4859641839488
147 22.636363636364 3.5006008167596
148 22.727272727273 3.5151285717900
149 22.818181818182 3.5295757265490
150 22.909090909091 3.5439706045569
151 23.000000000000 3.5583414614507
152 23.090909090909 3.5727164084470
153 23.181818181818 3.5871233678865
154 23.272727272727 3.6015900466180
155 23.363636363636 3.6161439038134
156 23.454545454545 3.6308120817070
157 23.545454545455 3.6456212622683
158 23.636363636364 3.6605974115804
159 23.727272727273 3.6757653780882
160 23.818181818182 3.6911483216329
161 23.909090909091 3.7067669668871
162 24.000000000000 3.7226386953562
163 24.090909090909 3.7387765105380
164 24.181818181818 3.7551879257226
165 24.272727272727 3.7718738281295
166 24.363636363636 3.7888273645828
167 24.454545454545 3.8060328765675
168 24.545454545455 3.8234648968141
169 24.636363636364 3.8410872196533
170 24.727272727273 3.8588520839843
171 24.818181818182 3.8766995601456
172 24.909090909091 3.8945572940574
173 25.000000000000 3.9123408056662
174 25.090909090909 3.9299545354314
175 25.181818181818 3.9472937671957
176 25.272727272727 3.9642474355297
177 25.363636363636 3.9807016791172
178 25.454545454545 3.9965438681261
179 25.545454545455 4.0116667476424
180 25.636363636364 4.0259723198282
181 25.727272727273 4.0393751330183
182 25.818181818182 4.0518047388756
183 25.909090909091 4.0632071938271
184 26.000000000000 4.0735455942983