Chart/GGPlot/Coord.pm

filter: Statementstmt 66.2% 55 / 83 Branchbran 29.1% 14 / 48 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 61.5% 8 / 13 Podpod 40.0% 4 / 10 totaltotal 51.5% 82 / 159 CC 26 SCAR 20.3
CC
26
Cov
52%
setup_panel_params
16.6
range
12.0
labels
9.8
CRAP 7.6
« Chart/GGPlot/Geom/Bar.pm ↑ Summary Chart/GGPlot/Geom.pm »
1 package Chart::GGPlot::Coord;
2  
3 # ABSTRACT: The role for coordinates
4  
5 5 ▶use Chart::GGPlot::Role qw(:pdl);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 our $VERSION = '0.002003'; # VERSION
9  
10 5 ▶use Types::Standard qw(Bool);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 # Renders the horizontal axes.
13 5 has render_axis_h => ( is => 'rw' );
14  
15 # Renders the vertical axes.
16 5 has render_axis_v => ( is => 'rw' );
17  
18 5 with qw(Chart::GGPlot::HasCollectibleFunctions);
19  
20  
21 0 ▶classmethod is_linear() { false; }
Subroutine is_linear: not called CC=3 SCAR=22.6
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for classmethod is_linear (expected 1, got ' . @_ . ')') 0 0 0
@_ > 1 and Function::Parameters::_croak('Too many arguments for classmethod is_linear (expected 1, got ' . @_ . ')') 0 0 0
22  
23  
24 5 requires 'transform';
25 5 requires 'distance';
26  
27 # Returns the desired aspect ratio for the plot.
28 0 ▶method aspect () { return; }
Subroutine aspect: not called CC=3 SCAR=22.6
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 1 and Function::Parameters::_croak('Too few arguments for method aspect (expected 1, got ' . @_ . ')') 0 0 0
@_ > 1 and Function::Parameters::_croak('Too many arguments for method aspect (expected 1, got ' . @_ . ')') 0 0 0
29  
30 # Returns a list containing labels for x and y.
31 0 ▶method labels ($panel_params) { $panel_params }
Subroutine labels: not called CC=3 SCAR=22.8
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for method labels (expected 2, got ' . @_ . ')') 0 0 0
@_ > 2 and Function::Parameters::_croak('Too many arguments for method labels (expected 2, got ' . @_ . ')') 0 0 0
32  
33 0 ▶method range ($panel_params) {
Subroutine range: not called CC=3 SCAR=24.8
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for method range (expected 2, got ' . @_ . ')') 0 0 0
@_ > 2 and Function::Parameters::_croak('Too many arguments for method range (expected 2, got ' . @_ . ')') 0 0 0
34 return {
35 0 x => $panel_params->at('x_range'),
36 y => $panel_params->at('y_range'),
37 };
38 5 }
39  
40 0 ▶method setup_panel_params ($scale_x, $scale_y, $params = {}) { {}; }
Subroutine setup_panel_params: not called CC=4 SCAR=28.1
Pod undocumented
Branch: 3 branches
BranchTrueFalseTotal
@_ < 3 and Function::Parameters::_croak('Too few arguments for method setup_panel_params (expected 3, got ' . @_ . ')') 0 0 0
@_ > 4 and Function::Parameters::_croak('Too many arguments for method setup_panel_params (expected 4, got ' . @_ . ')') 0 0 0
@_ < 3 and $params = {} 0 0 0
41  
42 7 ▶method setup_params ($data) { {}; }
Subroutine setup_params: called CC=3 SCAR=11.2
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for method setup_params (expected 2, got ' . @_ . ')') 0 7 7
@_ > 2 and Function::Parameters::_croak('Too many arguments for method setup_params (expected 2, got ' . @_ . ')') 0 7 7
43 7 ▶method setup_data ($data, $params) { $data }
Subroutine setup_data: called CC=3 SCAR=11.2
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 3 and Function::Parameters::_croak('Too few arguments for method setup_data (expected 3, got ' . @_ . ')') 0 7 7
@_ > 3 and Function::Parameters::_croak('Too many arguments for method setup_data (expected 3, got ' . @_ . ')') 0 7 7
44 7 ▶method setup_layout ($layout, $params) { $layout }
Subroutine setup_layout: called CC=3 SCAR=11.2
Pod documented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 3 and Function::Parameters::_croak('Too few arguments for method setup_layout (expected 3, got ' . @_ . ')') 0 7 7
@_ > 3 and Function::Parameters::_croak('Too many arguments for method setup_layout (expected 3, got ' . @_ . ')') 0 7 7
45  
46 # Optionally, modifies list of x and y scales in place. Currently
47 # used as a fudge for CoordFlip and CoordPolar
48 6 ▶method modify_scales ($scales_x, $scales_y) { }
Subroutine modify_scales: called CC=3 SCAR=11.2
Pod undocumented
Branch: 2 branches
BranchTrueFalseTotal
@_ < 3 and Function::Parameters::_croak('Too few arguments for method modify_scales (expected 3, got ' . @_ . ')') 0 6 6
@_ > 3 and Function::Parameters::_croak('Too many arguments for method modify_scales (expected 3, got ' . @_ . ')') 0 6 6
49  
50 12 ▶classmethod expand_default ($scale,
Subroutine expand_default: called CC=7 SCAR=21.5
Pod undocumented
51 12 ▶ $discrete = [0, 0.6, 0, 0.6], $continuous = [0.05, 0, 0.05, 0]) {
Branch: 4 branches
BranchTrueFalseTotal
@_ < 2 and Function::Parameters::_croak('Too few arguments for classmethod expand_default (expected 2, got ' . @_ . ')') 0 12 12
@_ > 4 and Function::Parameters::_croak('Too many arguments for classmethod expand_default (expected 4, got ' . @_ . ')') 0 12 12
@_ < 3 and do { @_ < 2 and $discrete = [0, "0.6", 0, "0.6"]; $continuous = ["0.05", 0, "0.05", 0] } 12 0 12
@_ < 2 and $discrete = [0, "0.6", 0, "0.6"] 12 0 12
52 return (
53 (
54 12 ▶ $scale->expand
Branch: 1 branch
BranchTrueFalseTotal
$scale->expand // $scale->$Chart::GGPlot::Coord::_DOES('Chart::GGPlot::Scale::Discrete') ? : 2 10 12
Condition33%1/3
$scale->expand // $scale->$Chart::GGPlot::Coord::_DOES("Chart::GGPlot::Scale::Discrete")
l!l&&r!l&&!r
0120
MC/DC0%0/2
$scale->expand // $scale->$Chart::GGPlot::Coord::_DOES("Chart::GGPlot::Scale::Discrete")
$scale->expand $scale->$Chart::GGPlot::Coord::_DOES("Chart::GGPlot::Scale::Discrete")
Truth table33%1/3
A // B
A= $scale->expandB= $scale->$Chart::GGPlot::Coord::_DOES("Chart::GGPlot::Scale::Discrete")
ABresult
1X1
011
000
55 // ( $scale->$_DOES('Chart::GGPlot::Scale::Discrete') )
56 )
57 ? $discrete
58 : $continuous
59 );
60 5 }
61  
62 5 1;
63  
64 __END__
« Chart/GGPlot/Geom/Bar.pm ↑ Summary Chart/GGPlot/Geom.pm »