Branch Coverage

blib/lib/Matplotlib/Simple.pm
Criterion Covered Total %
branch 0 550 0.0


line true false branch
280 0 0 if (ref $args ne "HASH")
289 0 0 if (scalar @undef_args > 0)
312 0 0 if (ref $args ne "HASH")
321 0 0 if (scalar @undef_args > 0)
330 0 0 if (scalar @bad_args > 0)
344 0 0 if ($args->{'args'}{$item} =~ /^([^\"\',]+)$/)
353 0 0 if ($ref ne "ARRAY" and $ref ne "")
356 0 0 if ($ref eq "")
357 0 0 if ($method eq 'show') { }
370 0 0 unless defined $args->{'ax'}
373 0 0 if (defined $args->{'args'}{'plot.type'} and $args->{'args'}{'plot.type'} eq "pie")
377 0 0 if $pie_plot == 1
388 0 0 if (ref $args ne "HASH")
397 0 0 if (scalar @undef_args > 0)
408 0 0 if (scalar @bad_opt > 0)
417 0 0 if (scalar keys %ref_counts > 1)
423 0 0 if (defined $ref_counts{''}) { }
0 0 elsif (defined $ref_counts{'ARRAY'}) { }
0 0 elsif (defined $ref_counts{'HASH'}) { }
448 0 0 if ($plot_type eq "grouped" and defined $plot->{'width'} and $plot->{'stacked'} == 0)
456 0 0 if (defined $plot->{'key.order'}) { }
462 0 0 if (defined $plot->{'log'})
466 0 0 if $c eq "color" and $plot_type eq "grouped"
468 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
0 0 elsif ($ref eq 'HASH') { }
480 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
491 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'HASH') { }
496 0 0 if (scalar @{$plot->{$err}{$i};} != 2)
512 0 0 if ($plot_type eq 'simple') { }
0 0 elsif ($plot_type eq 'grouped') { }
520 0 0 if (defined $plot->{'color'} and ref $plot->{'color'} eq "HASH")
522 0 0 if (scalar @undef_args > 0)
538 0 0 if ($plot->{'stacked'} == 0)
544 0 0 if $plot->{'plot.type'} eq "bar"
558 0 0 if ($plot->{'stacked'} > 0)
566 0 0 if $plot->{'stacked'} > 0
568 0 0 if $plot->{'stacked'} <= 0
573 0 0 if $plot->{'plot.type'} eq "bar"
588 0 0 if (ref $args ne "HASH")
596 0 0 if (scalar @undef_args > 0)
608 0 0 if (scalar @bad_opt > 0)
613 0 0 unless ($plot->{'orientation'} =~ /^(?:horizontal|vertical)$/)
618 0 0 if (defined $plot->{'key.order'}) { }
640 0 0 if (defined $plot->{'colors'}) { }
644 0 0 if (scalar @bad_keys > 0)
659 0 0 if (defined $plot->{'color'})
668 0 0 if ($plot->{'orientation'} eq 'vertical') { }
682 0 0 if (ref $args ne "HASH")
690 0 0 if (scalar @undef_args > 0)
698 0 0 if (scalar @bad_args > 0)
709 0 0 if (defined $plot->{'col.labels'}) { }
717 0 0 if $plot->{'mirror'} > 0
720 0 0 if (defined $plot->{'row.labels'}) { }
744 0 0 if $plot->{'cblogscale'} > 0
749 0 0 if ($plot->{'cblogscale'} > 0) { }
755 0 0 if (defined $plot->{'cblabel'}) { }
758 0 0 if $plot->{'colorbar.on'}
766 0 0 if ($plot->{'show.numbers'}) { }
774 0 0 if (defined $plot->{'logscale'})
779 0 0 if defined $plot->{'cb_min'}
780 0 0 if defined $plot->{'cb_max'}
791 0 0 if (ref $args ne "HASH")
799 0 0 if (scalar @undef_args > 0)
812 0 0 if (scalar @undef_args > 0)
822 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
827 0 0 if (defined $plot->{'key.order'}) { }
832 0 0 if (scalar @keys != 2)
837 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
850 0 0 if ($plot->{'cb_logscale'})
861 0 0 if ($plot->{$opt} ne "log" and $plot->{$opt} ne "linear")
868 0 0 if (defined $plot->{'marginals'} and $plot->{'marginals'} > 0)
884 0 0 unless &looks_like_number($plot->{$o})
890 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
894 0 0 if (defined $plot->{'cblabel'}) { }
910 0 0 unless defined $format
920 0 0 if (ref $args ne "HASH")
930 0 0 if (scalar @undef_args > 0)
940 0 0 if (scalar @undef_opt > 0)
945 0 0 if (defined $plot->{'log'} and $plot->{'log'} > 0)
950 0 0 if ref $plot->{$arg} eq "HASH"
952 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
953 0 0 if ($plot->{$arg} =~ /^[A-Za-z]+$/) { }
970 0 0 unless defined $plot->{$arg}{$set}
971 0 0 if ($plot->{$arg}{$set} =~ /^[A-Za-z]+$/) { }
990 0 0 if (ref $args ne "HASH")
998 0 0 if (scalar @undef_args > 0)
1008 0 0 if (scalar @undef_args > 0)
1017 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
1021 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
1026 0 0 if (defined $plot->{'key.order'}) { }
1031 0 0 if (scalar @keys != 2)
1036 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
1043 0 0 if ($plot->{'xlabel'})
1050 0 0 if ($plot->{'cb_logscale'})
1055 0 0 unless (&looks_like_number($plot->{$arg}))
1073 0 0 if ($bad_pts > 0)
1082 0 0 if ($bad_pts > 0)
1101 0 0 if ($plot->{'logscale'}) { }
1125 0 0 if $plot->{'show.colorbar'} == 0
1133 0 0 unless &looks_like_number($plot->{$o})
1139 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
1144 0 0 if (defined $plot->{'cblabel'}) { }
1155 0 0 if (ref $args ne "HASH")
1165 0 0 if (scalar @undef_args > 0)
1175 0 0 if (scalar @undef_args > 0)
1181 0 0 if ($data_ref ne "ARRAY")
1187 0 0 if (grep {not &looks_like_number($_);} @{$row;})
1192 0 0 if ($non_numeric_data and not defined $plot->{'stringmap'})
1202 0 0 if ($non_numeric_data)
1209 0 0 if ($non_numeric_data)
1215 0 0 if defined $plot->{'cmap'}
1227 0 0 if $non_numeric_data
1242 0 0 if ($non_numeric_data)
1251 0 0 unless &looks_like_number($plot->{$o})
1257 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
1261 0 0 if $plot->{'colorbar.on'}
1262 0 0 if ($non_numeric_data and $plot->{'colorbar.on'})
1271 0 0 if (ref $args ne "HASH")
1281 0 0 if (scalar @undef_args > 0)
1291 0 0 if (scalar @undef_opt > 0)
1297 0 0 if (defined $plot->{'key.order'}) { }
1304 0 0 if ($plot->{'autopct'} ne "")
1327 0 0 if (ref $args ne "HASH")
1336 0 0 if (scalar @undef_args > 0)
1346 0 0 if (scalar @bad_opt > 0)
1353 0 0 if (ref $plot->{'data'} eq "ARRAY")
1354 0 0 if (defined $plot->{'set.options'})
1356 0 0 if ($ref_type ne "ARRAY")
1362 0 0 if ($n_set_opt > $n_data)
1367 0 0 if (defined $plot->{'twinx'})
1368 0 0 if (ref $plot->{'twinx'} eq '') { }
0 0 elsif (ref $plot->{'twinx'} eq 'ARRAY') { }
1369 0 0 unless $plot->{'twinx'} =~ /^\d+$/
1373 0 0 if (scalar @bad_opt > 0)
1380 0 0 if (defined $plot->{'twinx.args'})
1382 0 0 unless $ref eq "HASH"
1384 0 0 if (scalar @bad_opt > 0)
1389 0 0 if grep {$idx == $_;} @twinx
1396 0 0 if ($ref ne "ARRAY")
1401 0 0 if ($n_elem != 2)
1406 0 0 if ($bad_opt[0] != $bad_opt[1])
1414 0 0 if scalar @bad_opt == 0
1425 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1430 0 0 if (defined $plot->{'set.options'}[$arr_i])
1434 0 0 if (grep {$arr_i == $_;} @twinx) { }
1437 0 0 if (defined $plot->{'twinx.args'}{$arr_i})
1452 0 0 if (defined $plot->{'key.order'}) { }
1457 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "HASH")
1459 0 0 if (scalar @bad_opt > 0)
1464 0 0 if (defined $plot->{'twinx'})
1465 0 0 if (ref $plot->{'twinx'} eq '') { }
0 0 elsif (ref $plot->{'twinx'} eq 'HASH') { }
1466 0 0 unless $plot->{'twinx'} =~ /^\d+$/
1470 0 0 if (scalar @bad_opt > 0)
1477 0 0 if (defined $plot->{'twinx.args'})
1479 0 0 unless $ref eq "HASH"
1481 0 0 if (scalar @bad_opt > 0)
1486 0 0 if grep {$set eq $_;} @twinx
1493 0 0 if ($set_ref ne "ARRAY")
1498 0 0 if ($n_arrays != 2)
1503 0 0 if ($n_elem[0] != $n_elem[1])
1511 0 0 if (scalar @undef_i > 0)
1523 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1528 0 0 if (defined $plot->{'set.options'}{$set})
1532 0 0 if ($plot->{'show.legend'})
1536 0 0 if (grep {$set eq $_;} @twinx) { }
1539 0 0 if (defined $plot->{'twinx.args'}{$set})
1558 0 0 if (ref $args ne "HASH")
1568 0 0 if (scalar @undef_args > 0)
1578 0 0 if (scalar @undef_opt > 0)
1583 0 0 if ($overall_ref ne "HASH")
1592 0 0 if (scalar %ref_counts > 1)
1596 0 0 if (defined $ref_counts{'ARRAY'}) { }
0 0 elsif (defined $ref_counts{'HASH'}) { }
1607 0 0 if ($plot_type eq 'single') { }
0 0 elsif ($plot_type eq 'multiple') { }
1609 0 0 if (defined $plot->{'keys'}) { }
1615 0 0 if ($n_keys != 2 and $n_keys != 3)
1620 0 0 if (defined $plot->{'color_key'}) { }
0 0 elsif (scalar @keys == 3) { }
1624 0 0 if $key ne $plot->{'color_key'}
1635 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1640 0 0 if (defined $color_key) { }
1654 0 0 if grep {$set eq $_;} keys %{$$plot{"data"};}
1657 0 0 if (scalar @undefined_opts > 0)
1667 0 0 if (defined $plot->{'keys'}) { }
1673 0 0 if ($n_keys != 2 and $n_keys != 3)
1677 0 0 if (not defined $color_key and $n_keys == 3)
1680 0 0 if (defined $plot->{'set.options'}{$set})
1685 0 0 if (defined $color_key) { }
1687 0 0 unless ($options =~ /label\s*=/)
1698 0 0 if defined $color_key
1706 0 0 if (ref $args ne "HASH")
1714 0 0 if (scalar @undef_args > 0)
1724 0 0 if (scalar @undef_opt > 0)
1729 0 0 unless ($plot->{'orientation'} =~ /^(?:horizontal|vertical)$/)
1734 0 0 if (defined $plot->{'key.order'}) { }
1744 0 0 if ($plot->{'log'})
1750 0 0 if defined $_
1757 0 0 if (defined $plot->{'colors'}) { }
1760 0 0 if (scalar @wrong_keys > 0)
1775 0 0 if (defined $plot->{'color'})
1782 0 0 if ($plot->{'whiskers'})
1808 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1823 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1838 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1853 0 0 if (ref $args ne "HASH")
1861 0 0 if (scalar @undef_args > 0)
1872 0 0 if (scalar @undef_opt > 0)
1880 0 0 if ($ref_type eq 'HASH') { }
0 0 elsif ($ref_type eq 'ARRAY') { }
1904 0 0 if ($plot->{'show.legend'} > 0) { }
1946 0 0 if ($str =~ /^\w+\h*=\h*["']/)
1949 0 0 if ($str =~ /^\w+$/) { }
0 0 elsif ($str =~ m"[!\@#\$\%^&*\(\)\{\}\[\]\<\>,/\-\h:;\+=\w]+$") { }
0 0 elsif ($str =~ /,/ and not $str =~ /[\]\[]/) { }
1966 0 0 if (ref $args ne "HASH")
1969 0 0 if (scalar grep({$args->{$_};} "output.file", "show") == 0)
2007 0 0 if (scalar @undef_args > 0)
2011 0 0 unless (defined $args->{'plot.type'} or defined $args->{'plots'})
2017 0 0 if (ref $args->{'output.file'} ne "")
2026 0 0 if (scalar @bad_args > 0)
2033 0 0 if (defined $args->{'plot.type'} and defined $args->{'data'})
2036 0 0 if ($single_plot == 1 and not defined $args->{'plot.type'})
2041 0 0 if ($single_plot == 0 and not defined $args->{'plots'})
2045 0 0 if ($single_plot == 0 and ref $args->{'plots'} ne "ARRAY")
2049 0 0 if ($single_plot == 0 and scalar @{$args->{'plots'};} == 0)
2053 0 0 if ($single_plot == 1)
2054 0 0 if defined $args->{$_}
2061 0 0 if ($single_plot == 0 and $args->{'nrows'} * $args->{'ncols'} < scalar @{$args->{'plots'};})
2071 0 0 if ($single_plot == 0)
2075 0 0 if (scalar @bad_args > 0)
2081 0 0 if (scalar @output_file > 0)
2087 0 0 if ($single_plot == 1 and ref $args->{'data'} eq "HASH" and scalar keys %{$$args{"data"};} == 0)
2091 0 0 if defined $args->{$_}
2092 0 0 if (scalar @bad_args > 0)
2109 0 0 if (defined $args->{'shared.colorbar'} and $single_plot == 1)
2113 0 0 if (defined $args->{'shared.colorbar'})
2115 0 0 if ($ref ne "ARRAY")
2120 0 0 if ($max_subplot_idx > $args->{'nrows'} * $args->{'ncols'} - 1)
2125 0 0 if (defined $args->{'fh'}) { }
2127 0 0 if ($ref ne "File::Temp")
2138 0 0 if ($single_plot == 0) { }
0 0 elsif ($single_plot == 1) { }
2149 0 0 if (defined $args->{'plots'})
2153 0 0 if defined $plot->{'plot.type'}
2157 0 0 if (scalar @undef_plot_types > 0)
2173 0 0 if ($single_plot == 1)
2176 0 0 unless defined $graph->{'plot.type'}
2185 0 0 unless (defined $dispatch{$type})
2189 0 0 unless defined $dispatch{$type}
2213 0 0 if (defined $args->{'shared.colorbar'} and grep {$_ == $ax;} @{$$args{"shared.colorbar"};})
2217 0 0 if ($ax == &max(@{$$args{'shared.colorbar'};})) { }
2238 0 0 if (scalar @undef_keys > 0)
2270 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2272 0 0 if ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2273 0 0 if ($plt_method eq 'show') { }
2284 0 0 if ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2298 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2309 0 0 if (defined $args->{'scale'})
2313 0 0 if (defined $args->{'scalex'})
2316 0 0 if (defined $args->{'scaley'})
2328 0 0 if $args->{'execute'} == 0
2329 0 0 if ($args->{'execute'}) { }
2333 0 0 if ($exit != 0)
2353 0 0 if (defined $args->{'plot.type'} and $args->{'plot.type'} ne $sub_name)
2356 0 0 if (defined $args->{'plots'})