Branch Coverage

blib/lib/Matplotlib/Simple.pm
Criterion Covered Total %
branch 0 586 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"
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)
536 0 0 if ($plot->{'stacked'} == 0)
542 0 0 if $plot->{'plot.type'} eq "bar"
556 0 0 if ($plot->{'stacked'} > 0)
564 0 0 if $plot->{'stacked'} > 0
566 0 0 if $plot->{'stacked'} <= 0
571 0 0 if $plot->{'plot.type'} eq "bar"
586 0 0 if (ref $args ne "HASH")
594 0 0 if (scalar @undef_args > 0)
606 0 0 if (scalar @bad_opt > 0)
611 0 0 unless ($plot->{'orientation'} =~ /^(?:horizontal|vertical)$/)
615 0 0 if (ref $plot->{'data'} eq "ARRAY")
620 0 0 if (defined $plot->{'key.order'}) { }
636 0 0 if ($axis =~ /^([^xy])$/)
646 0 0 if (scalar @non_numeric > 0)
653 0 0 if (defined $plot->{'colors'}) { }
657 0 0 if (scalar @bad_keys > 0)
672 0 0 if (defined $plot->{'color'})
681 0 0 if ($plot->{'orientation'} eq 'vertical') { }
695 0 0 if (ref $args ne "HASH")
703 0 0 if (scalar @undef_args > 0)
711 0 0 if (scalar @bad_args > 0)
722 0 0 if (defined $plot->{'col.labels'}) { }
730 0 0 if $plot->{'mirror'} > 0
733 0 0 if (defined $plot->{'row.labels'}) { }
757 0 0 if $plot->{'cb_logscale'} > 0
765 0 0 unless (&looks_like_number($plot->{$opt}))
771 0 0 if (scalar @options > 0)
774 0 0 if ($plot->{'cb_logscale'}) { }
780 0 0 if (defined $plot->{'cblabel'}) { }
783 0 0 if $plot->{'colorbar.on'}
791 0 0 if ($plot->{'show.numbers'}) { }
800 0 0 if ($axis =~ /^([^xy])$/)
818 0 0 if (ref $args ne "HASH")
826 0 0 if (scalar @undef_args > 0)
839 0 0 if (scalar @undef_args > 0)
849 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
854 0 0 if (defined $plot->{'key.order'}) { }
859 0 0 if (scalar @keys != 2)
864 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
877 0 0 if ($plot->{'cb_logscale'})
888 0 0 if ($plot->{$opt} ne "log" and $plot->{$opt} ne "linear")
895 0 0 if (defined $plot->{'marginals'} and $plot->{'marginals'} > 0)
911 0 0 unless &looks_like_number($plot->{$o})
917 0 0 if ($plot->{'colorbar.on'} and defined $plot->{'shared.colorbar'})
921 0 0 if (defined $plot->{'cblabel'}) { }
937 0 0 unless defined $format
947 0 0 if (ref $args ne "HASH")
957 0 0 if (scalar @undef > 0)
967 0 0 if (scalar @undef > 0)
974 0 0 if ref $plot->{$arg} eq "HASH"
976 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
977 0 0 if ($plot->{$arg} =~ /^[A-Za-z]+$/) { }
990 0 0 if ($axis =~ /^([^xy])$/)
996 0 0 if (ref $plot->{'data'} eq "ARRAY")
1000 0 0 if (scalar keys %{$$plot{'data'};} > 1) { }
1007 0 0 if (scalar @non_numeric > 0)
1015 0 0 unless defined $plot->{$arg}{$set}
1016 0 0 if ($plot->{$arg}{$set} =~ /^[A-Za-z]+$/) { }
1023 0 0 if ($plot->{'show.legend'}) { }
1035 0 0 if (ref $args ne "HASH")
1043 0 0 if (scalar @undef_args > 0)
1053 0 0 if (scalar @undef_args > 0)
1062 0 0 if ($plot->{'xbins'} == 0 or $plot->{'ybins'} == 0)
1067 0 0 if (defined $plot->{'key.order'}) { }
1072 0 0 if (scalar @keys != 2)
1077 0 0 if (scalar @{$plot->{'data'}{$keys[1]};} != $n_points)
1084 0 0 if ($plot->{'xlabel'})
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 $plot->{'twinx'} =~ /^\d+$/
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 (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 (defined $plot->{'set.options'} and ref $plot->{'set.options'} eq "")
1680 0 0 if (defined $color_key) { }
1694 0 0 if grep {$set eq $_;} keys %{$$plot{"data"};}
1697 0 0 if (scalar @undefined_opts > 0)
1708 0 0 if (defined $plot->{'keys'}) { }
1714 0 0 if ($n_keys != 2 and $n_keys != 3)
1720 0 0 if (scalar @undef_args > 0)
1725 0 0 if (not defined $color_key and $n_keys == 3)
1728 0 0 if (defined $plot->{'set.options'}{$set})
1733 0 0 if (defined $color_key) { }
1735 0 0 unless ($options =~ /label\s*=/)
1746 0 0 if defined $color_key
1754 0 0 if (ref $args ne "HASH")
1762 0 0 if (scalar @undef_args > 0)
1772 0 0 if (scalar @undef_opt > 0)
1777 0 0 unless ($plot->{'orientation'} =~ /^(?:horizontal|vertical)$/)
1781 0 0 if (ref $plot->{'data'} eq "ARRAY")
1786 0 0 if (defined $plot->{'key.order'}) { }
1796 0 0 if ($plot->{'log'})
1802 0 0 if defined $_
1808 0 0 if ($axis =~ /^([^xy])$/)
1815 0 0 if (defined $plot->{'colors'}) { }
1818 0 0 if (scalar @wrong_keys > 0)
1833 0 0 if (defined $plot->{'color'})
1840 0 0 if ($plot->{'whiskers'})
1866 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1881 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1892 0 0 if ($plot->{'orientation'} eq 'vertical') { }
1907 0 0 if (ref $args ne "HASH")
1915 0 0 if (scalar @undef_args > 0)
1926 0 0 if (scalar @undef_opt > 0)
1934 0 0 if ($ref_type eq 'HASH') { }
0 0 elsif ($ref_type eq 'ARRAY') { }
1958 0 0 if ($plot->{'show.legend'} > 0) { }
2000 0 0 if ($str =~ /^\w+\h*=\h*["']/)
2003 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 =~ /[\]\[]/) { }
2022 0 0 if (ref $args ne "HASH")
2025 0 0 if (scalar grep({$args->{$_};} "output.file", "show") == 0)
2063 0 0 if (scalar @undef_args > 0)
2067 0 0 unless (defined $args->{'plot.type'} or defined $args->{'plots'})
2073 0 0 if (ref $args->{'output.file'} ne "")
2082 0 0 if (scalar @bad_args > 0)
2088 0 0 if defined $args->{'nrow'}
2089 0 0 if defined $args->{'ncol'}
2093 0 0 if (defined $args->{'plot.type'} and defined $args->{'data'})
2096 0 0 if ($single_plot == 1 and not defined $args->{'plot.type'})
2101 0 0 if ($single_plot == 0 and not defined $args->{'plots'})
2105 0 0 if ($single_plot == 0 and ref $args->{'plots'} ne "ARRAY")
2109 0 0 if ($single_plot == 0 and scalar @{$args->{'plots'};} == 0)
2113 0 0 if ($single_plot == 1)
2114 0 0 if defined $args->{$_}
2119 0 0 if ($single_plot == 0 and $args->{'nrows'} * $args->{'ncols'} < scalar @{$args->{'plots'};})
2129 0 0 if ($single_plot == 0)
2133 0 0 if (scalar @bad_args > 0)
2141 0 0 if (scalar @output_file > 0)
2147 0 0 if ($single_plot == 1 and ref $args->{'data'} eq "HASH" and scalar keys %{$$args{"data"};} == 0)
2151 0 0 if defined $args->{$_}
2152 0 0 if (scalar @bad_args > 0)
2169 0 0 if ($args->{'arr'})
2172 0 0 if (defined $args->{'shared.colorbar'} and $single_plot == 1)
2176 0 0 if (defined $args->{'shared.colorbar'})
2178 0 0 if ($ref ne "ARRAY")
2183 0 0 if ($max_subplot_idx > $args->{'nrows'} * $args->{'ncols'} - 1)
2188 0 0 if (defined $args->{'add'})
2190 0 0 if ($ref ne "ARRAY")
2194 0 0 if (defined $args->{'fh'}) { }
2196 0 0 if ($ref ne "File::Temp")
2207 0 0 if ($single_plot == 0) { }
0 0 elsif ($single_plot == 1) { }
2218 0 0 if (defined $args->{'plots'})
2222 0 0 if defined $plot->{'plot.type'}
2226 0 0 if (scalar @undef_plot_types > 0)
2242 0 0 if ($single_plot == 1)
2245 0 0 unless defined $graph->{'plot.type'}
2254 0 0 unless (defined $dispatch{$type})
2258 0 0 unless defined $dispatch{$type}
2282 0 0 if (defined $args->{'shared.colorbar'} and grep {$_ == $ax;} @{$$args{"shared.colorbar"};})
2286 0 0 if ($ax == &max(@{$$args{'shared.colorbar'};})) { }
2294 0 0 if (defined $plot->{'add'})
2296 0 0 if ($ref ne "ARRAY")
2312 0 0 if (scalar @undef_keys > 0)
2344 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2346 0 0 if ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2347 0 0 if ($plt_method eq 'show') { }
2358 0 0 if ($type eq 'single quotes') { }
0 0 elsif ($type eq 'no quotes') { }
2372 0 0 if ($ref eq '') { }
0 0 elsif ($ref eq 'ARRAY') { }
2383 0 0 if (defined $args->{'scale'})
2387 0 0 if (defined $args->{'scalex'})
2390 0 0 if (defined $args->{'scaley'})
2402 0 0 if $args->{'execute'} == 0
2403 0 0 if ($args->{'execute'}) { }
2407 0 0 if ($exit != 0)
2428 0 0 if (defined $args->{'plot.type'} and $args->{'plot.type'} ne $sub_name)
2431 0 0 if (defined $args->{'plots'})