Branch Coverage

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


line true false branch
284 0 0 if (ref $args ne "HASH")
293 0 0 if (scalar @undef_args > 0)
311 0 0 if (ref $args ne "HASH")
320 0 0 if (scalar @undef_args > 0)
329 0 0 if (scalar @bad_args > 0)
343 0 0 if ($args->{'args'}{$item} =~ /^([^\"\',]+)$/)
352 0 0 if ($ref ne "ARRAY" and $ref ne "")
355 0 0 if ($ref eq "")
356 0 0 if ($method eq 'show') { }
369 0 0 unless defined $args->{'ax'}
372 0 0 if (defined $args->{'args'}{'plot.type'} and $args->{'args'}{'plot.type'} eq "pie")
376 0 0 if $pie_plot == 1
387 0 0 if (ref $args ne "HASH")
396 0 0 if (scalar @undef_args > 0)
407 0 0 if (scalar @bad_opt > 0)
416 0 0 if (scalar keys %ref_counts > 1)
422 0 0 if (defined $ref_counts{''}) { }
0 0 elsif (defined $ref_counts{'ARRAY'}) { }
0 0 elsif (defined $ref_counts{'HASH'}) { }
447 0 0 if ($plot_type eq "grouped" and defined $plot->{'width'} and $plot->{'stacked'} == 0)
455 0 0 if (defined $plot->{'key.order'}) { }
461 0 0 if ($plot->{'log'} or $plot->{'logscale'})
465 0 0 if $c eq "color" and $plot_type eq "grouped" and ref $plot->{$c} ne ""
467 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
0 0 elsif ($ref eq 'HASH') { }
479 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
490 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'HASH') { }
495 0 0 if (scalar @{$plot->{$err}{$i};} != 2)
511 0 0 if ($plot_type eq 'simple') { }
0 0 elsif ($plot_type eq 'grouped') { }
518 0 0 if (defined $plot->{'color'} and ref $plot->{'color'} eq "HASH")
520 0 0 if (scalar @undef_args > 0)
537 0 0 if ($plot->{'stacked'} == 0)
543 0 0 if $plot->{'plot.type'} eq "bar"
553 0 0 if ref $plot->{$_} eq "ARRAY"
557 0 0 if ($plot->{'stacked'} > 0)
558 0 0 $plot->{'plot.type'} eq 'barh' ? :
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)$/)
617 0 0 if (ref $plot->{'data'} eq "ARRAY")
622 0 0 if (defined $plot->{'key.order'}) { }
638 0 0 if ($axis =~ /^([^xy])$/)
648 0 0 if (scalar @non_numeric > 0)
655 0 0 if (defined $plot->{'colors'}) { }
659 0 0 if (scalar @bad_keys > 0)
674 0 0 if (defined $plot->{'color'})
683 0 0 if ($plot->{'orientation'} eq 'vertical') { }
697 0 0 if (ref $args ne "HASH")
705 0 0 if (scalar @undef_args > 0)
713 0 0 if (scalar @bad_args > 0)
724 0 0 if (defined $plot->{'col.labels'}) { }
732 0 0 if $plot->{'mirror'} > 0
735 0 0 if (defined $plot->{'row.labels'}) { }
758 0 0 if $plot->{'cb_logscale'} > 0
768 0 0 unless (&looks_like_number($plot->{$opt}))
774 0 0 if (scalar @options > 0)
777 0 0 if ($plot->{'cb_logscale'}) { }
783 0 0 if (defined $plot->{'cblabel'}) { }
786 0 0 if $plot->{'colorbar.on'}
794 0 0 if ($plot->{'show.numbers'}) { }
803 0 0 if ($axis =~ /^([^xy])$/)
821 0 0 if (ref $args ne "HASH")
829 0 0 if (scalar @undef_args > 0)
842 0 0 if (scalar @undef_args > 0)
852 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
857 0 0 if (defined $plot->{'key.order'}) { }
862 0 0 if (scalar @keys != 2)
867 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
880 0 0 if ($plot->{'cb_logscale'})
891 0 0 if ($plot->{$opt} ne "log" and $plot->{$opt} ne "linear")
898 0 0 if (defined $plot->{'marginals'} and $plot->{'marginals'} > 0)
914 0 0 unless &looks_like_number($plot->{$o})
920 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
924 0 0 if (defined $plot->{'cblabel'}) { }
940 0 0 unless defined $format
950 0 0 if (ref $args ne "HASH")
960 0 0 if (scalar @undef > 0)
970 0 0 if (scalar @undef > 0)
977 0 0 if ref $plot->{$arg} eq "HASH"
979 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
980 0 0 if ($plot->{$arg} =~ /^[A-Za-z]+$/) { }
993 0 0 if ($axis =~ /^([^xy])$/)
999 0 0 if (ref $plot->{'data'} eq "ARRAY")
1003 0 0 if (scalar keys %{$$plot{'data'};} > 1) { }
1010 0 0 if (scalar @non_numeric > 0)
1018 0 0 unless defined $plot->{$arg}{$set}
1019 0 0 if ($plot->{$arg}{$set} =~ /^[A-Za-z]+$/) { }
1026 0 0 if ($plot->{'show.legend'}) { }
1038 0 0 if (ref $args ne "HASH")
1046 0 0 if (scalar @undef_args > 0)
1056 0 0 if (scalar @undef_args > 0)
1065 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
1070 0 0 if (defined $plot->{'key.order'}) { }
1075 0 0 if (scalar @keys != 2)
1080 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
1091 0 0 if ($plot->{'cb_logscale'})
1096 0 0 unless (&looks_like_number($plot->{$arg}))
1114 0 0 if ($bad_pts > 0)
1123 0 0 if ($bad_pts > 0)
1142 0 0 if ($plot->{'logscale'}) { }
1145 0 0 if ($axis =~ /^([^xy])$/)
1170 0 0 if $plot->{'show.colorbar'} == 0
1178 0 0 unless &looks_like_number($plot->{$o})
1184 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
1189 0 0 if (defined $plot->{'cblabel'}) { }
1200 0 0 if (ref $args ne "HASH")
1210 0 0 if (scalar @undef_args > 0)
1220 0 0 if (scalar @undef_args > 0)
1226 0 0 if ($data_ref ne "ARRAY")
1232 0 0 if (grep {not &looks_like_number($_);} @{$row;})
1237 0 0 if ($non_numeric_data and not defined $plot->{'stringmap'})
1247 0 0 if ($non_numeric_data)
1254 0 0 if ($non_numeric_data)
1260 0 0 if defined $plot->{'cmap'}
1272 0 0 if $non_numeric_data
1287 0 0 if ($non_numeric_data)
1296 0 0 unless &looks_like_number($plot->{$o})
1302 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
1306 0 0 if $plot->{'colorbar.on'}
1307 0 0 if ($non_numeric_data and $plot->{'colorbar.on'})
1316 0 0 if (ref $args ne "HASH")
1326 0 0 if (scalar @undef_args > 0)
1336 0 0 if (scalar @undef_opt > 0)
1342 0 0 if (defined $plot->{'key.order'}) { }
1349 0 0 if ($plot->{'autopct'} ne "")
1370 0 0 if (ref $args ne "HASH")
1378 0 0 if (scalar @undef_args > 0)
1388 0 0 if (scalar @bad_opt > 0)
1395 0 0 if ($axis =~ /^([^xy])$/)
1402 0 0 if (ref $plot->{'data'} eq "ARRAY")
1403 0 0 if (defined $plot->{'set.options'})
1405 0 0 if ($ref_type ne "ARRAY")
1411 0 0 if ($n_set_opt > $n_data)
1416 0 0 if (defined $plot->{'twinx'})
1417 0 0 if (ref $plot->{'twinx'} eq '') { }
0 0 elsif (ref $plot->{'twinx'} eq 'ARRAY') { }
1418 0 0 unless $plot->{'twinx'} =~ /^\d+$/
1422 0 0 if (scalar @bad_opt > 0)
1429 0 0 if (defined $plot->{'twinx.args'})
1431 0 0 unless $ref eq "HASH"
1433 0 0 if (scalar @bad_opt > 0)
1438 0 0 if grep {$idx == $_;} @twinx
1445 0 0 if ($ref ne "ARRAY")
1450 0 0 if ($n_elem != 2)
1455 0 0 if ($bad_opt[0] != $bad_opt[1])
1463 0 0 if scalar @bad_opt == 0
1474 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1479 0 0 if (defined $plot->{'set.options'}[$arr_i])
1483 0 0 if (grep {$arr_i == $_;} @twinx) { }
1486 0 0 if (defined $plot->{'twinx.args'}{$arr_i})
1501 0 0 if (defined $plot->{'key.order'}) { }
1506 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "HASH")
1508 0 0 if (scalar @bad_opt > 0)
1513 0 0 if (defined $plot->{'twinx'})
1514 0 0 if (ref $plot->{'twinx'} eq '') { }
0 0 elsif (ref $plot->{'twinx'} eq 'HASH') { }
1515 0 0 unless defined $plot->{'data'}{$plot->{'twinx'}}
1519 0 0 if (scalar @bad_opt > 0)
1526 0 0 if (defined $plot->{'twinx.args'})
1528 0 0 unless $ref eq "HASH"
1530 0 0 if (scalar @bad_opt > 0)
1535 0 0 if grep {$set eq $_;} @twinx
1542 0 0 if ($set_ref ne "ARRAY")
1547 0 0 if ($n_arrays != 2)
1552 0 0 if ($n_elem[0] != $n_elem[1])
1560 0 0 if (scalar @undef_i > 0)
1570 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1575 0 0 if (ref $plot->{'set.options'} eq "HASH" and defined $plot->{'set.options'}{$set})
1579 0 0 if ($plot->{'show.legend'})
1583 0 0 if (grep {$set eq $_;} @twinx) { }
1586 0 0 if (defined $plot->{'twinx.args'}{$set})
1605 0 0 if (ref $args ne "HASH")
1613 0 0 if (scalar @undef_args > 0)
1623 0 0 if (scalar @undef_args > 0)
1628 0 0 if ($overall_ref ne "HASH")
1637 0 0 if (scalar %ref_counts > 1)
1641 0 0 if (defined $ref_counts{'ARRAY'}) { }
0 0 elsif (defined $ref_counts{'HASH'}) { }
1654 0 0 if ($plot_type eq 'single') { }
0 0 elsif ($plot_type eq 'multiple') { }
1657 0 0 if (defined $plot->{'keys'}) { }
1663 0 0 if ($n_keys != 2 and $n_keys != 3)
1667 0 0 if (defined $plot->{'color_key'}) { }
0 0 elsif (scalar @keys == 3) { }
1675 0 0 if (scalar @undef_i > 0)
1682 0 0 if (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1689 0 0 unless &looks_like_number($plot->{$o})
1694 0 0 if (defined $color_key) { }
1695 0 0 unless (defined $plot->{'data'}{$color_key})
1710 0 0 if grep {$set eq $_;} keys %{$$plot{"data"};}
1713 0 0 if (scalar @undefined_opts > 0)
1724 0 0 if (defined $plot->{'keys'}) { }
1730 0 0 if ($n_keys != 2 and $n_keys != 3)
1736 0 0 if (scalar @undef_args > 0)
1741 0 0 if (defined $plot->{'color_key'}) { }
0 0 elsif (scalar @keys == 3) { }
1747 0 0 if (not defined $color_key and $n_keys == 3)
1750 0 0 if (defined $plot->{'set.options'}{$set})
1755 0 0 if (defined $color_key) { }
1756 0 0 unless (defined $plot->{'data'}{$set}{$color_key})
1760 0 0 unless ($options =~ /label\s*=/)
1771 0 0 if defined $color_key
1779 0 0 if (ref $args ne "HASH")
1787 0 0 if (scalar @undef_args > 0)
1797 0 0 if (scalar @undef_opt > 0)
1802 0 0 unless ($plot->{'orientation'} =~ /^(?:horizontal|vertical)$/)
1805 0 0 if (ref $plot->{'data'} eq "ARRAY")
1810 0 0 if (defined $plot->{'key.order'}) { }
1823 0 0 if defined $_
1829 0 0 if ($axis =~ /^([^xy])$/)
1836 0 0 if (defined $plot->{'colors'}) { }
1839 0 0 if (scalar @wrong_keys > 0)
1854 0 0 if (defined $plot->{'color'})
1861 0 0 if ($plot->{'whiskers'})
1887 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1902 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1913 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1928 0 0 if (ref $args ne "HASH")
1936 0 0 if (scalar @undef_args > 0)
1947 0 0 if (scalar @undef_opt > 0)
1955 0 0 if ($ref_type eq 'HASH') { }
0 0 elsif ($ref_type eq 'ARRAY') { }
1979 0 0 if ($plot->{'show.legend'} > 0) { }
2021 0 0 if (&looks_like_number($str))
2024 0 0 if ($str =~ /^\w+\h*=\h*["']/)
2027 0 0 if ($str =~ /^\w+$/) { }
0 0 elsif ($str =~ /^\[\h*\-?\d.+\d\h*\]$/) { }
0 0 elsif ($str =~ m"[!\@#\$\%^&*\(\)\{\}\[\]\<\>,/\-\h:;\+=\w]+$") { }
0 0 elsif ($str =~ /,/ and not $str =~ /[\]\[]/) { }
2046 0 0 if (ref $args ne "HASH")
2049 0 0 if (scalar grep({$args->{$_};} "output.file", "show") == 0)
2053 0 0 $args->{'show'} ? :
2087 0 0 if (scalar @undef_args > 0)
2091 0 0 unless (defined $args->{'plot.type'} or defined $args->{'plots'})
2097 0 0 if (ref $args->{'output.file'} ne "")
2106 0 0 if (scalar @bad_args > 0)
2112 0 0 if defined $args->{'nrow'}
2113 0 0 if defined $args->{'ncol'}
2117 0 0 if (defined $args->{'plot.type'} and defined $args->{'data'})
2120 0 0 if ($single_plot == 1 and not defined $args->{'plot.type'})
2125 0 0 if ($single_plot == 0 and not defined $args->{'plots'})
2129 0 0 if ($single_plot == 0 and ref $args->{'plots'} ne "ARRAY")
2133 0 0 if ($single_plot == 0 and scalar @{$args->{'plots'};} == 0)
2137 0 0 if ($single_plot == 1)
2138 0 0 if defined $args->{$_}
2143 0 0 if ($single_plot == 0 and $args->{'nrows'} * $args->{'ncols'} < scalar @{$args->{'plots'};})
2153 0 0 if ($single_plot == 0)
2157 0 0 if (scalar @bad_args > 0)
2165 0 0 if (scalar @output_file > 0)
2171 0 0 if ($single_plot == 1 and ref $args->{'data'} eq "HASH" and scalar keys %{$$args{"data"};} == 0)
2175 0 0 if defined $args->{$_}
2176 0 0 if (scalar @bad_args > 0)
2193 0 0 if (defined $args->{'shared.colorbar'} and $single_plot == 1)
2197 0 0 if (defined $args->{'shared.colorbar'})
2199 0 0 if ($ref ne "ARRAY")
2204 0 0 if ($max_subplot_idx > $args->{'nrows'} * $args->{'ncols'} - 1)
2209 0 0 if (defined $args->{'add'})
2211 0 0 if ($ref ne "ARRAY")
2215 0 0 if (defined $args->{'fh'}) { }
2217 0 0 if ($ref ne "File::Temp")
2228 0 0 if ($single_plot == 0) { }
0 0 elsif ($single_plot == 1) { }
2239 0 0 if (defined $args->{'plots'})
2243 0 0 if defined $plot->{'plot.type'}
2247 0 0 if (scalar @undef_plot_types > 0)
2263 0 0 if ($single_plot == 1)
2267 0 0 unless defined $type
2268 0 0 unless defined $dispatch{$type}
2277 0 0 unless (defined $dispatch{$type})
2304 0 0 if (defined $args->{'shared.colorbar'} and grep {$_ == $ax;} @{$$args{"shared.colorbar"};})
2308 0 0 if ($ax == &max(@{$$args{'shared.colorbar'};})) { }
2316 0 0 if (defined $plot->{'add'})
2318 0 0 if ($ref ne "ARRAY")
2325 0 0 unless defined $type
2326 0 0 unless defined $dispatch{$type}
2338 0 0 if (scalar @undef_keys > 0)
2370 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2372 0 0 if ($plt_method eq 'show') { }
0 0 elsif ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2382 0 0 if ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2396 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2407 0 0 if (defined $args->{'scale'})
2411 0 0 if (defined $args->{'scalex'})
2414 0 0 if (defined $args->{'scaley'})
2417 0 0 if (defined $args->{'output.file'})
2427 0 0 if $args->{'show'}
2429 0 0 if $args->{'execute'} == 0
2430 0 0 if ($args->{'execute'}) { }
2434 0 0 if ($exit != 0)
2440 0 0 if defined $args->{'output.file'}
2443 0 0 if defined $args->{'output.file'}
2455 0 0 if (defined $args->{'plot.type'} and $args->{'plot.type'} ne $sub_name)
2458 0 0 if (defined $args->{'plots'})