Skip to content

Commit a128add

Browse files
committed
clearer varnames in scalethings
1 parent 7bf83b4 commit a128add

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/PDL/Graphics/TriD/Graph.pm

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,16 @@ sub set_axis {
7171

7272
# Bind all unbound things here...
7373
sub scalethings {
74-
my($this) = @_;
75-
$this->bind_default($_) for keys %{$this->{UnBound}};
76-
$_->init_scale() for values %{$this->{Axis}};
77-
my ($k,$v);
78-
while(($k,$v) = each %{$this->{DataBind}}) {
79-
$this->{Axis}{$_->[0]}->add_scale($this->{Data}{$k}->get_points(), $_->[1]) for @$v;
80-
}
81-
$_->finish_scale() for values %{$this->{Axis}};
74+
my($this) = @_;
75+
$this->bind_default($_) for keys %{$this->{UnBound}};
76+
$_->init_scale() for values %{$this->{Axis}};
77+
while(my ($series_name,$v) = each %{$this->{DataBind}}) {
78+
for my $bound (@$v) {
79+
my ($axis, $axes) = @$bound;
80+
$this->{Axis}{$axis}->add_scale($this->{Data}{$series_name}->get_points(), $axes);
81+
}
82+
}
83+
$_->finish_scale() for values %{$this->{Axis}};
8284
}
8385

8486
sub get_points {

0 commit comments

Comments
 (0)