Simple/PGPLOT.pm

filter: Statementstmt 11.0% 23 / 208 Branchbran 5.4% 5 / 92 Conditioncond 9.5% 2 / 21 MC/DCmcdc 7.6% 1 / 13 Subroutinesub 41.6% 5 / 12 Podpod 0.0% 0 / 3 totaltotal 10.3% 36 / 349 SCAR 77.8
CC
56
Cov
9%
plot
930.0
new
182.0
__ANON__
30.0
CRAP 2392.4
« Simple/Gnuplot.pm ↑ Summary
1  
2 ######################################################################
3 ######################################################################
4 ######################################################################
5 ###
6 ###
7 ### PGPLOT interface to PDL::Graphics::Simple.
8 ###
9 ### See the PDL::Graphics::Simple docs for details
10 ###
11 ##
12 #
13  
14 package PDL::Graphics::Simple::PGPLOT;
15  
16 1 ▶use File::Temp qw/tempfile/;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use PDL::Options q/iparse/;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 ▶use PDL;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 1 our $mod = {
22 shortname => 'pgplot',
23 module=>'PDL::Graphics::Simple::PGPLOT',
24 engine => 'PDL::Graphics::PGPLOT::Window',
25 synopsis=> 'PGPLOT (venerable but trusted)',
26 pgs_version=> '1.005'
27 };
28 1 PDL::Graphics::Simple::register( 'PDL::Graphics::Simple::PGPLOT' );
29  
30 ##########
31 # PDL::Graphics::Simple::PGPLOT::check
32 # Checker
33  
34 sub check {
35 5 ▶ my $force = shift;
Subroutine check: called CC=8 SCAR=33.4
Pod undocumented
36 5 ▶ $force = 0 unless(defined($force));
Branch: 1 branch
BranchTrueFalseTotal
unless defined $force 4 1 5
37  
38 5 ▶ return $mod->{ok} unless( $force or !defined($mod->{ok}) );
Branch: 1 branch
BranchTrueFalseTotal
unless $force or not defined $mod->{"ok"} 4 1 5
Condition66%2/3
$force or not defined $mod->{"ok"}
l!l&&r!l&&!r
104
MC/DC50%1/2
$force or not defined $mod->{"ok"}
$force not defined $mod->{"ok"}
Truth table66%2/3
A or not(B)
A= $forceB= not defined $mod->{"ok"}
ABresult
1X1
011
000
39
40 1 ▶ eval 'use PDL::Graphics::PGPLOT::Window;';
Subroutine BEGIN: called CC=1 SCAR=1.2
41 1 ▶ if($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 1 0 1
42 1 $mod->{ok} = 0;
43 1 $mod->{msg} = $@;
44 1 return 0;
45 }
46
47 # Module loaded OK, now try to extract valid devices from it
48 0 my ($fh,$tf) = tempfile('pgg_pgplot_XXXX');
49 0 close $fh;
50  
51 0 my $cmd = qq{|perl -e "use PGPLOT; open STDOUT,q[>$tf] || die; open STDERR,STDOUT || die; pgopen(q[?])"};
52 0 open FOO,$cmd;
53 0 print FOO "?\n";
54 0 close FOO;
55 0 open FOO,"<$tf";
56 0 my @lines = grep /^\s+\//, (<FOO>) ;
57 0 close FOO;
58 0 unlink $tf;
59
60 0 $mod->{devices} = { map { chomp; s/^\s*\///; s/\s.*//; ($_,1) } @lines };
61  
62 0 ▶ if( $mod->{devices}->{'XWINDOW'} ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($mod->{'devices'}{'XWINDOW'}) { } 0 0 0
elsif ($mod->{'devices'}{'XSERVE'}) { } 0 0 0
63 0 $mod->{disp_dev} = 'XWINDOW';
64 } elsif($mod->{devices}->{'XSERVE'} ) {
65 0 $mod->{disp_dev} = 'XSERVE';
66 } else {
67 0 $mod->{ok} = 0;
68 0 return 0;
69 }
70  
71 0 ▶ unless( $mod->{devices}->{'VCPS'} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($mod->{"devices"}{"VCPS"}) 0 0 0
72 0 $mod->{ok} = 0;
73 0 return 0;
74 }
75  
76 0 return 1;
77 }
78  
79 ##########
80 # PDL::Graphics::Simple::PGPLOT::new
81 1 our $new_defaults ={
82 size => [8,6,'in'],
83 type => '',
84 output=>'',
85 multi=>undef
86 };
87  
88 1 our $filetypes = {
89 png => 'PNG',
90 ps => 'VCPS'
91 };
92  
93 sub new {
94 0 ▶ my $pkg = shift;
Subroutine new: not called CC=13 SCAR=52.0
Pod undocumented
95 0 my $opt_in = shift;
96 0 my $opt = { iparse( $new_defaults, $opt_in ) };
97
98 0 my $pgw;
99
100 # Force a recheck on failure, in case the user fixed PGPLOT.
101 # Also loads PDL::Graphics::PGPLOT::Window.
102 0 ▶ unless(check()) {
Branch: 1 branch
BranchTrueFalseTotal
unless (check()) 0 0 0
103 0 ▶ die "$mod->{shortname} appears nonfunctional\n" unless(check(1));
Branch: 1 branch
BranchTrueFalseTotal
unless check(1) 0 0 0
104 }
105  
106 # Figure the device name and size to feed to PGPLOT.
107 # size has already been regularized.
108 0 my $conv_tempfile;
109 my $dev;
110  
111 0 ▶ if( $opt->{type} =~ m/^i/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt->{'type'} =~ /^i/i) { } 0 0 0
112 0 ▶ $dev = ( defined($opt->{output}) ? $opt->{output} : "" ) . "/" . $mod->{disp_dev};
Branch: 1 branch
BranchTrueFalseTotal
defined $opt->{'output'} ? : 0 0 0
113 } else {
114 0 my $ext;
115  
116 0 ▶ if($PDL::VERSION < 3 and ($PDL::VERSION > 2.1 or $PDL::VERSION < 2.005)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($PDL::VERSION < 3 and $PDL::VERSION > "2.1" || $PDL::VERSION < "2.005") 0 0 0
Condition0%0/6
$PDL::VERSION < 3 and $PDL::VERSION > "2.1" || $PDL::VERSION < "2.005"
!ll&&!rl&&r
000
$PDL::VERSION > "2.1" or $PDL::VERSION < "2.005"
l!l&&r!l&&!r
000
MC/DC0%0/3
$PDL::VERSION < 3 and $PDL::VERSION > "2.1" || $PDL::VERSION < "2.005"
$PDL::VERSION < 3 $PDL::VERSION > "2.1" $PDL::VERSION < "2.005"
Truth table0%0/4
A and B or C
A= $PDL::VERSION < 3B= $PDL::VERSION > "2.1"C= $PDL::VERSION < "2.005"
ABCresult
0XX0
1000
11X1
1011
117 0 print STDERR "WARNING - file output shapes vary under PDL < 2.005 (early version: $PDL::VERSION)\n";
118 }
119  
120 0 ▶ if( $opt->{output} =~ m/\.(\w{2,4})$/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt->{'output'} =~ /\.(\w{2,4})$/) { } 0 0 0
121 0 $ext = $1;
122 } else {
123 0 $ext = 'png';
124 0 $opt->{output} .= ".png";
125 }
126  
127 0 our $mod;
128 0 ▶ unless( $filetypes->{$ext} and $mod->{devices}->{$filetypes->{$ext}} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filetypes->{$ext} and $mod->{'devices'}{$filetypes->{$ext}}) { } 0 0 0
Condition0%0/3
$filetypes->{$ext} and $mod->{"devices"}{$filetypes->{$ext}}
!ll&&!rl&&r
000
MC/DC0%0/2
$filetypes->{$ext} and $mod->{"devices"}{$filetypes->{$ext}}
$filetypes->{$ext} $mod->{"devices"}{$filetypes->{$ext}}
Truth table0%0/3
A and B
A= $filetypes->{$ext}B= $mod->{"devices"}{$filetypes->{$ext}}
ABresult
0X0
100
111
129 0 my($fh);
130 0 ($fh, $conv_tempfile) = tempfile('pgs_pgplot_XXXX');
131 0 close $fh;
132 0 unlink $conv_tempfile; # just to be sure...
133 0 $conv_tempfile .= ".ps";
134 0 $dev = "$conv_tempfile/VCPS";
135 } else {
136 0 $dev = "$opt->{output}/$filetypes->{$ext}";
137 }
138 }
139  
140 0 ($ENV{'PGPLOT_PS_WIDTH'}) = $opt->{size}->[0] * 1000;
141 0 ($ENV{'PGPLOT_PS_HEIGHT'}) = $opt->{size}->[1] * 1000;
142  
143 0 my @params = ( 'size => [$opt->{size}->[0], $opt->{size}->[1] ]' );
144 0 ▶ if( defined($opt->{multi}) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $opt->{"multi"}) 0 0 0
145 0 push(@params, 'nx=>$opt->{multi}->[0]');
146 0 push(@params, 'ny=>$opt->{multi}->[1]');
147 }
148  
149
150 0 my $creator = 'pgwin( $dev, { '. join(",", @params) . '} );';
151 0 $pgw = eval $creator;
152 0 ▶ print STDERR $@ if($@);
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 0 0
153
154 0 my $me = { opt=>$opt, conv_fn=>$conv_tempfile, obj=>$pgw };
155 0 return bless($me, 'PDL::Graphics::Simple::PGPLOT');
156 }
157  
158 our $pgplot_methods = {
159 'lines' => 'line',
160 'bins' => 'bin',
161 'points' => 'points',
162 'errorbars' => sub {
163 0 ▶ my ($me, $ipo, $data, $ppo) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
164 0 $me->{obj}->points($data->[0],$data->[1],$ppo);
165 0 $me->{obj}->errb($data->[0],$data->[1],$data->[2]);
166 },
167 'limitbars'=> sub {
168 0 ▶ my ($me, $ipo, $data, $ppo) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
169 # use XY absolute error form, but with X errorbars right on the point
170 0 $me->{obj}->points($data->[0],$data->[1],$ppo);
171 0 my $z = zeroes($data->[0]);
172 0 $me->{obj}->errb($data->[0],$data->[1], $z, $z, -($data->[2]-$data->[1]), $data->[3]-$data->[1], $ppo);
173 },
174 'image' => 'imag',
175 'circles'=> sub {
176 0 ▶ my ($me,$ipo,$data,$ppo) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
177 0 $ppo->{filltype}='outline';
178 0 $me->{obj}->tcircle(@$data, $ppo);
179 },
180 'labels'=> sub {
181 0 ▶ my ($me,$ipo,$data,$ppo) = @_;
Subroutine __ANON__: not called CC=5 SCAR=34.0
182 0 for my $i(0..$data->[0]->dim(0)-1) {
183 0 $s = $data->[2]->[$i];
184 0 my $j = 0.0;
185 0 ▶ if( $s =~ s/^([\<\|\>\ ])// ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($s =~ s/^([\<\|\>\ ])//) 0 0 0
186 0 ▶ $j = 0.5 if($1 eq '|');
Branch: 1 branch
BranchTrueFalseTotal
if $1 eq "|" 0 0 0
187 0 ▶ $j = 1.0 if($1 eq '>');
Branch: 1 branch
BranchTrueFalseTotal
if $1 eq ">" 0 0 0
188 }
189 0 $me->{obj}->text( $s, $data->[0]->at($i), $data->[1]->at($i), {JUSTIFICATION=>$j} );
190 }
191 }
192
193 1 };
194  
195 ##############################
196 # PDL::Graphics::Simple::PGPLOT::plot
197  
198 sub plot {
199 0 ▶ my $me = shift;
Subroutine plot: not called CC=30 SCAR=68.4
Pod undocumented
200 0 my $ipo = shift;
201 0 my $po = {};
202 0 ▶ $po->{title} = $ipo->{title} if(defined($ipo->{title}));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"title"} 0 0 0
203 0 ▶ $po->{xtitle}= $ipo->{xtitle} if(defined($ipo->{xtitle}));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"xtitle"} 0 0 0
204 0 ▶ $po->{ytitle}= $ipo->{ytitle} if(defined($ipo->{ytitle}));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"ytitle"} 0 0 0
205 0 ▶ $po->{justify}= $ipo->{justify} if(defined($ipo->{justify}));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"justify"} 0 0 0
206
207 0 my %color_opts = ();
208 0 ▶ if(defined($ipo->{crange})) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $ipo->{"crange"}) 0 0 0
209 0 ▶ $color_opts{'MIN'} = $ipo->{crange}->[0] if(defined($ipo->{crange}->[0]));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"crange"}[0] 0 0 0
210 0 ▶ $color_opts{'MAX'} = $ipo->{crange}->[0] if(defined($ipo->{crange}->[1]));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ipo->{"crange"}[1] 0 0 0
211 }
212
213 0 my $more = 0;
214  
215 0 ▶ if($ipo->{oplot} and $me->{opt}->{type} =~ m/^f/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipo->{"oplot"} and $me->{"opt"}{"type"} =~ /^f/i) 0 0 0
Condition0%0/3
$ipo->{"oplot"} and $me->{"opt"}{"type"} =~ /^f/i
!ll&&!rl&&r
000
MC/DC0%0/2
$ipo->{"oplot"} and $me->{"opt"}{"type"} =~ /^f/i
$ipo->{"oplot"} $me->{"opt"}{"type"} =~ /^f/i
Truth table0%0/3
A and B
A= $ipo->{"oplot"}B= $me->{"opt"}{"type"} =~ /^f/i
ABresult
0X0
100
111
216 0 die "The PGPLOT engine does not yet support oplot for files. Instead, \nglom all your lines together into one call to plot.\n";
217 }
218  
219 0 ▶ unless($ipo->{oplot}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipo->{'oplot'}) { } 0 0 0
220  
221 0 $me->{curvestyle} = 0;
222  
223 0 $me->{logaxis} = $ipo->{logaxis};
224  
225 0 $po->{axis} = 0;
226 0 ▶ if($ipo->{logaxis} =~ m/x/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipo->{"logaxis"} =~ /x/i) 0 0 0
227 0 $po->{axis} += 10;
228 0 $ipo->{xrange} = [ log10($ipo->{xrange}->[0]), log10($ipo->{xrange}->[1]) ];
229 }
230 0 ▶ if($ipo->{logaxis} =~ m/y/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipo->{"logaxis"} =~ /y/i) 0 0 0
231 0 $po->{axis} += 20;
232 0 $ipo->{yrange} = [ log10($ipo->{yrange}->[0]), log10($ipo->{yrange}->[1]) ];
233 }
234
235 0 $me->{obj}->release;
236 0 $me->{obj}->env(@{$ipo->{xrange}}, @{$ipo->{yrange}}, $po);
237 0 $me->{obj}->hold;
238 } else {
239 # Force a hold if we are held.
240 0 $me->{obj}->hold;
241 }
242  
243 # ppo is "post-plot options", which are really a mix of plot and curve options.
244 # Currently we don't parse any plot options into it (they're handled by the "env"
245 # call) but if we end up doing so, it should go here. The linestyle and color
246 # are curve options that are autoincremented each curve.
247 0 my %ppo = ();
248 0 my $ppo = \%ppo;
249
250 0 ▶ while(@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
251 0 my ($co, @data) = @{shift()};
252 0 my @extra_opts = ();
253  
254 0 ▶ if( defined($co->{style}) and $co->{style} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $co->{'style'} and $co->{'style'}) { } 0 0 0
Condition0%0/3
defined $co->{"style"} and $co->{"style"}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $co->{"style"} and $co->{"style"}
defined $co->{"style"} $co->{"style"}
Truth table0%0/3
A and B
A= defined $co->{"style"}B= $co->{"style"}
ABresult
0X0
100
111
255 0 $me->{curvestyle} = int($co->{style});
256 } else {
257 0 $me->{curvestyle}++;
258 }
259  
260 0 $ppo->{ color } = ($me->{curvestyle}-1) % 7 + 1;
261 0 $ppo->{ linestyle } = ($me->{curvestyle}-1) % 5 + 1;
262  
263  
264 0 ▶ if( defined($co->{width}) and $co->{width} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $co->{"width"} and $co->{"width"}) 0 0 0
Condition0%0/3
defined $co->{"width"} and $co->{"width"}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $co->{"width"} and $co->{"width"}
defined $co->{"width"} $co->{"width"}
Truth table0%0/3
A and B
A= defined $co->{"width"}B= $co->{"width"}
ABresult
0X0
100
111
265 0 $ppo->{ linewidth } = int($co->{width});
266 }
267  
268 0 our $pgplot_methods;
269 0 my $pgpm = $pgplot_methods->{$co->{with}};
270 0 ▶ die "Unknown curve option 'with $co->{with}'!" unless($pgpm);
Branch: 1 branch
BranchTrueFalseTotal
unless $pgpm 0 0 0
271  
272 0 ▶ if($pgpm eq 'imag') {
Branch: 1 branch
BranchTrueFalseTotal
if ($pgpm eq "imag") 0 0 0
273 0 for my $k(keys %color_opts) {
274 0 $po->{$k} = $color_opts{$k};
275 }
276  
277 0 $ppo->{ drawwedge } = ($ipo->{wedge} != 0);
278  
279 # Extract transform parameters from the corners of the image...
280 0 my $xcoords = shift(@data);
281 0 my $ycoords = shift(@data);
282  
283 0 my $datum_pix = [0,0];
284 0 my $datum_sci = [$xcoords->at(0,0), $ycoords->at(0,0)];
285
286 0 my $t1 = ($xcoords->slice("(-1),(0)") - $xcoords->slice("(0),(0)")) / ($xcoords->dim(0)-1);
287 0 my $t2 = ($xcoords->slice("(0),(-1)") - $xcoords->slice("(0),(0)")) / ($xcoords->dim(1)-1);
288
289 0 my $t4 = ($ycoords->slice("(-1),(0)") - $ycoords->slice("(0),(0)")) / ($ycoords->dim(0)-1);
290 0 my $t5 = ($ycoords->slice("(0),(-1)") - $ycoords->slice("(0),(0)")) / ($ycoords->dim(1)-1);
291
292 0 my $transform = pdl(
293 $datum_sci->[0] - $t1 * $datum_pix->[0] - $t2 * $datum_pix->[1],
294 $t1, $t2,
295 $datum_sci->[1] - $t4 * $datum_pix->[0] - $t5 * $datum_pix->[1],
296 $t4, $t5
297 )->flat;
298  
299 { # sepia color table
300 0 my $r = (xvals(256)/255)->sqrt;
301 0 my $g = (xvals(256)/255);
302 0 my $b = (xvals(256)/255)**2;
303 0 $me->{obj}->ctab($g, $r, $g, $b);
304 }
305 }
306  
307 0 ▶ if($me->{logaxis} =~ m/x/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($me->{"logaxis"} =~ /x/i) 0 0 0
308 0 $data[0] = $data[0]->log10;
309 }
310 0 ▶ if($me->{logaxis} =~ m/y/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($me->{"logaxis"} =~ /y/i) 0 0 0
311 0 $data[1] = $data[1]->log10;
312 }
313  
314 0 ▶ if(ref($pgpm) eq 'CODE') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $pgpm eq 'CODE') { } 0 0 0
315 0 &$pgpm($me, $ipo, \@data, $ppo);
316 } else {
317 0 my $str= sprintf('$me->{obj}->%s(@data,%s);%s',$pgpm,'$ppo',"\n");
318 0 eval $str;
319 }
320  
321 0 ▶ unless($pgpm eq 'imag') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($pgpm eq "imag") 0 0 0
322 0 $ppo->{linestyle}++;
323 0 $ppo->{color}++;
324 }
325  
326 0 $me->{obj}->hold;
327 }
328  
329 ##############################
330 # End of curve plotting.
331 # Now place the legend if necessary.
332 0 ▶ if($ipo->{legend}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ipo->{"legend"}) 0 0 0
333 0 my $xp;
334 0 my $xrdiff = $ipo->{xrange}->[1] - $ipo->{xrange}->[0];
335 0 ▶ if( $ipo->{legend}=~ m/l/i ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($ipo->{'legend'} =~ /l/i) { } 0 0 0
elsif ($ipo->{'legend'} =~ /r/i) { } 0 0 0
336 0 $xp = 0.03 * $xrdiff + $ipo->{xrange}->[0];
337 } elsif($ipo->{legend} =~ m/r/i) {
338 0 $xp = 0.8 * $xrdiff + $ipo->{xrange}->[0];
339 } else {
340 0 $xp = 0.4 * $xrdiff + $ipo->{xrange}->[0];
341 }
342  
343 0 my $yp;
344 0 my $yrdiff = $ipo->{yrange}->[1] - $ipo->{yrange}->[0];
345 0 ▶ if( $ipo->{legend}=~ m/t/i ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($ipo->{'legend'} =~ /t/i) { } 0 0 0
elsif ($ipo->{'legend'} =~ /b/i) { } 0 0 0
346 0 $yp = 0.95 * $yrdiff + $ipo->{yrange}->[0];
347 } elsif($ipo->{legend} =~ m/b/i) {
348 0 $yp = 0.2 * $yrdiff + $ipo->{yrange}->[0];
349 } else {
350 0 $yp = 0.6 * $yrdiff + $ipo->{yrange}->[0];
351 }
352  
353 0 print "keys is [".join(",",@{$me->{keys}})."]; xp is $xp; yp is $yp\n";
354 $me->{obj}->legend(
355 $me->{keys},
356 $xp, $yp,
357 0 { Color => [ (xvals(0+@{$me->{keys}}) % 7 + 1)->list ],
358 0 LineStyle => [ (xvals(0+@{$me->{keys}}) % 5 + 1)->list ]
359 }
360 );
361 }
362  
363 0 $me->{obj}->release;
364  
365 }
366  
367  
368 sub DESTROY {
369 0 ▶ my $me = shift;
Subroutine DESTROY: not called CC=4 SCAR=30.0
370  
371 0 $me->{obj}->release;
372  
373 0 ▶ if($me->{type} =~ m/^f/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($me->{"type"} =~ /^f/i) 0 0 0
374 0 eval q{ $me->{obj}->close; };
375  
376 0 ▶ my $file = ( ($me->{conv_fn}) ? $me->{conv_fn} : $me->{output} );
Branch: 1 branch
BranchTrueFalseTotal
$me->{'conv_fn'} ? : 0 0 0
377 0 ▶ if($me->{conv_fn}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($me->{"conv_fn"}) 0 0 0
378 0 my $a;
379 0 $a = rim($me->{conv_fn}) ;
380 0 wim($a, $me->{opt}->{output});
381 0 unlink($me->{conv_fn});
382 }
383 }
384 }
« Simple/Gnuplot.pm ↑ Summary