Chart/GGPlot/Built.pm

filter: Statementstmt 56.2% 27 / 48 Branchbran 0.0% 0 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 100% 3 / 3 totaltotal 45.0% 36 / 80 CC 11 SCAR 28.1
CC
11
Cov
40%
layer_scales
30.0
layer_data
20.0
layer_prestats_data
20.0
CRAP 16.6
« Chart/GGPlot/Util/Scales/_Viridis.pm ↑ Summary Chart/GGPlot/Stat/Identity.pm »
1 package Chart::GGPlot::Built;
2  
3 # ABSTRACT: A processed ggplot that can be rendered
4  
5 1 ▶use Chart::GGPlot::Class qw(:pdl);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.002003'; # VERSION
9  
10 1 ▶use Data::Frame::Types qw(DataFrame);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use List::AllUtils qw(pairmap);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Types::Standard qw(ArrayRef ConsumerOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶use Chart::GGPlot::Types qw(:all);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16  
17 1 has data => ( is => 'ro', isa => ArrayRef [DataFrame] );
18 1 has prestats_data => ( is => 'ro', isa => ArrayRef [DataFrame] );
19 1 has layout => ( is => 'ro', isa => ConsumerOf['Chart::GGPlot::Layout'] );
20 1 has plot => ( is => 'ro', isa => ConsumerOf['Chart::GGPlot::Plot'] );
21  
22  
23 0 ▶method layer_data ( $i = 0 ) {
Subroutine layer_data: not called CC=4 SCAR=30.0
Pod documented
Branch: 3 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method layer_data (expected 1, got ' . @_ . ')') 0 0 0
@_ > 2 and Function::Parameters::_croak('Too many arguments for method layer_data (expected 2, got ' . @_ . ')') 0 0 0
@_ < 1 and $i = 0 0 0 0
24 0 return $self->data->at($i);
25 1 }
26  
27 0 ▶method layer_prestats_data ( $i = 0 ) {
Subroutine layer_prestats_data: not called CC=4 SCAR=30.0
Pod documented
Branch: 3 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method layer_prestats_data (expected 1, got ' . @_ . ')') 0 0 0
@_ > 2 and Function::Parameters::_croak('Too many arguments for method layer_prestats_data (expected 2, got ' . @_ . ')') 0 0 0
@_ < 1 and $i = 0 0 0 0
28 0 return $self->prestats_data->at($i);
29 1 }
30  
31 0 ▶method layer_scales ( $i = 0, $j = 0 ) {
Subroutine layer_scales: not called CC=5 SCAR=34.0
Pod documented
Branch: 4 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method layer_scales (expected 1, got ' . @_ . ')') 0 0 0
@_ > 3 and Function::Parameters::_croak('Too many arguments for method layer_scales (expected 3, got ' . @_ . ')') 0 0 0
@_ < 2 and do { @_ < 1 and $i = 0; $j = 0 } 0 0 0
@_ < 1 and $i = 0 0 0 0
32 0 my $layout = $self->layout->layout;
33  
34 0 my $which =
35 ( which( $layout->at('ROW') == $i ) & which( $layout->at('COL') == $j ) );
36 0 my $selected = $layout->select_rows($which);
37 return {
38 0 x => $self->layout->panel_scales_x->at( $selected->at('SCALE_X') ),
39 y => $self->layout->panel_scales_y->at( $selected->at('SCALE_Y') ),
40 };
41 1 }
42  
43 #method summarize_layout () {
44 # my $l = $self->layout;
45 #
46 # my $layout =
47 # [qw(panel row col)]->map( sub { $l->layout->at( uc( $_[0] ) ) } );
48 #
49 # my $facet_vars = $l->facet->vars();
50 #
51 # # Add a list-column of panel vars (for facets).
52 # #$layout->at('vars') =
53 #
54 # return $layout;
55 #}
56  
57 1 1;
58  
59 __END__
« Chart/GGPlot/Util/Scales/_Viridis.pm ↑ Summary Chart/GGPlot/Stat/Identity.pm »