| 1 | package Chart::GGPlot::Stat::Identity; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # ABSTRACT: Statistic method that does identity | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 7 | ▶ | use Chart::GGPlot::Class; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 7 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 7 | ▶ | use MooseX::Singleton; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 7 | our $VERSION = '0.002003'; # VERSION | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 7 | ▶ | use Chart::GGPlot::Layer; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 7 | ▶ | use Chart::GGPlot::Util::Pod qw(layer_func_pod); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 7 | with qw( | |||||||||||||||||||||||||||
| 15 | Chart::GGPlot::Stat | ||||||||||||||||||||||||||||
| 16 | ); | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 7 | my $stat_identity_pod = layer_func_pod(<<'EOT'); | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | stat_identity(:$mapping=undef, :$data=undef, | ||||||||||||||||||||||||||||
| 21 | :$geom="point", :$position="identity", | ||||||||||||||||||||||||||||
| 22 | :$show_legend=undef, :$inherit_aes=true, | ||||||||||||||||||||||||||||
| 23 | %rest) | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | Arguments: | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =over 4 | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | %TMPL_COMMON_ARGS% | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | =back | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | EOT | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 0 | ▶ | my $stat_identity_code = fun ( | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=6 SCAR=37.4
Branch: 1 branch
Condition0%0/3
@_ > 0 and @_ % 2
MC/DC0%0/2
@_ > 0 and @_ % 2
@_ > 0
@_ % 2
Truth table0%0/3
A and B
A= @_ > 0B= @_ % 2
| |||||||||||||||||||||||||||||
| 36 | :$mapping = undef, :$data = undef, | ||||||||||||||||||||||||||||
| 37 | :$geom = "point", :$position = "identity", | ||||||||||||||||||||||||||||
| 38 | :$show_legend = undef, :$inherit_aes = true, | ||||||||||||||||||||||||||||
| 39 | %rest ) | ||||||||||||||||||||||||||||
| 40 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||
| 41 | 0 | return Chart::GGPlot::Layer->new( | |||||||||||||||||||||||||||
| 42 | mapping => $mapping, | ||||||||||||||||||||||||||||
| 43 | data => $data, | ||||||||||||||||||||||||||||
| 44 | stat => 'identify', | ||||||||||||||||||||||||||||
| 45 | position => $position, | ||||||||||||||||||||||||||||
| 46 | show_legend => $show_legend, | ||||||||||||||||||||||||||||
| 47 | inherit_aes => $inherit_aes, | ||||||||||||||||||||||||||||
| 48 | geom => 'blank', | ||||||||||||||||||||||||||||
| 49 | params => { na_rm => false, %rest }, | ||||||||||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||||||||||
| 51 | 7 | }; | |||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 7 | ▶ | classmethod ggplot_functions() { | ||||||||||||||||||||||||||
|
Subroutine
ggplot_functions: called CC=3 SCAR=11.3
Pod
undocumented
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 54 | return [ | ||||||||||||||||||||||||||||
| 55 | { | ||||||||||||||||||||||||||||
| 56 | 7 | name => 'stat_identity', | |||||||||||||||||||||||||||
| 57 | code => $stat_identity_code, | ||||||||||||||||||||||||||||
| 58 | pod => $stat_identity_pod, | ||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||
| 60 | ]; | ||||||||||||||||||||||||||||
| 61 | 7 | } | |||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | 4 | ▶ | method compute_layer( $data, $params, $layout ) { | ||||||||||||||||||||||||||
|
Subroutine
compute_layer: called CC=3 SCAR=11.2
Pod
undocumented
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 64 | 4 | return $data; | |||||||||||||||||||||||||||
| 65 | 7 | } | |||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | 7 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | 7 | 1; | |||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | __END__ | ||||||||||||||||||||||||||||