| 1 | package Chart::GGPlot::Guide::Legend; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # ABSTRACT: Legend guide | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use Chart::GGPlot::Setup; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | our $VERSION = '0.002003'; # VERSION | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use parent qw(Chart::GGPlot::Guide); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 2 | ▶ | use Data::Frame; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub BUILD { | ||||||||||||||||||||||||||
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 14 | 0 | my ($self, $args) = @_; | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | $self->set( 'key', {} ); | |||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 0 | ▶ | method train ($scale, $aesthetic=undef) { | ||||||||||||||||||||||||||
|
Subroutine
train: not called CC=7 SCAR=40.3
Pod
undocumented
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 20 | 0 | my $breaks = $scale->get_breaks(); | |||||||||||||||||||||||||||
| 21 | 0 | ▶ | if ($breaks->length == 0 or $breaks->ngood == 0) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$breaks->length == 0 or $breaks->ngood == 0
MC/DC0%0/2
$breaks->length == 0 or $breaks->ngood == 0
$breaks->length == 0
$breaks->ngood == 0
Truth table0%0/3
A or B
A= $breaks->length == 0B= $breaks->ngood == 0
| |||||||||||||||||||||||||||||
| 22 | 0 | return; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 0 | ▶ | my $aes_column_name = $aesthetic // $scale->aesthetics->[0]; | ||||||||||||||||||||||||||
|
Condition0%0/3
$aesthetic // $scale->aesthetics->[0]
MC/DC0%0/2
$aesthetic // $scale->aesthetics->[0]
$aesthetic
$scale->aesthetics->[0]
Truth table0%0/3
A // B
A= $aestheticB= $scale->aesthetics->[0]
| |||||||||||||||||||||||||||||
| 26 | 0 | my $key = Data::Frame->new( | |||||||||||||||||||||||||||
| 27 | columns => [ | ||||||||||||||||||||||||||||
| 28 | $aes_column_name => $scale->map_to_limits($breaks), | ||||||||||||||||||||||||||||
| 29 | label => $scale->get_labels($breaks), | ||||||||||||||||||||||||||||
| 30 | ] | ||||||||||||||||||||||||||||
| 31 | ); | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | if ( $self->reverse ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 34 | 0 | $key = $self->_reverse_df($key); | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 0 | $self->set('key', $key); | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | return $self; | |||||||||||||||||||||||||||
| 40 | 2 | } | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 2 | 1; | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | __END__ | ||||||||||||||||||||||||||||