| 1 | package Chart::GGPlot::Range::Continuous; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | # ABSTRACT: Continuous range | ||||||||||||||
| 4 | |||||||||||||||
| 5 | 8 | ▶ | use Chart::GGPlot::Class qw(:pdl); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 8 | ▶ | use namespace::autoclean; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 8 | our $VERSION = '0.002003'; # VERSION | |||||||||||||
| 9 | |||||||||||||||
| 10 | 8 | with qw(Chart::GGPlot::Range); | |||||||||||||
| 11 | |||||||||||||||
| 12 | 8 | ▶ | use Types::PDL -types; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | |||||||||||||||
| 14 | 8 | ▶ | use Chart::GGPlot::Util qw(is_discrete range_); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 15 | |||||||||||||||
| 16 | 38 | ▶ | method train ($p) { | ||||||||||||
|
Subroutine
train: called CC=5 SCAR=16.3
Pod
undocumented
Branch: 2 branches
| |||||||||||||||
| 17 | 38 | ▶ | return $self->range if $p->isnull; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 18 | |||||||||||||||
| 19 | 38 | ▶ | if (is_discrete($p)) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 20 | 1 | die("Discrete value supplied to continuous scale"); | |||||||||||||
| 21 | } | ||||||||||||||
| 22 | 37 | my $range = range_( $self->range->glue(0, $p) ); | |||||||||||||
| 23 | 37 | $self->range($range); | |||||||||||||
| 24 | |||||||||||||||
| 25 | 37 | return $self->range; | |||||||||||||
| 26 | 8 | } | |||||||||||||
| 27 | |||||||||||||||
| 28 | 8 | __PACKAGE__->meta->make_immutable; | |||||||||||||
| 29 | |||||||||||||||
| 30 | 8 | 1; | |||||||||||||
| 31 | |||||||||||||||
| 32 | __END__ | ||||||||||||||