Skip to content

Commit fed1757

Browse files
committed
plot_acf replace oplot with single plot
1 parent 049fbe0 commit fed1757

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/PDL/Stats/TS.pd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -623,16 +623,16 @@ sub PDL::plot_acf {
623623
carp "SIG outside of recognized value. default to 0.05";
624624
$y_sig = 1.95996398454005;
625625
}
626-
627626
my $w = $opt{WIN} || PDL::Graphics::Simple::pgswin();
628627
my $seq = pdl(-1,$h+1);
629628
my $y_seq = ones(2) * $y_sig / sqrt($self->dim(0)) * -1;
630-
$w->plot(with=>'lines', $seq, zeroes(2)); # x axis
631-
$w->oplot(with=>'lines', style=>2, $seq, $y_seq);
632-
$w->oplot(with=>'lines', style=>2, $seq, -$y_seq);
633-
$w->oplot((map +(with=>'lines', ones(2)*$_, pdl(0, $r->slice("($_)"))), 0..$h), { xlabel=>'lag', ylabel=>'acf', });
634-
635-
return $r;
629+
$w->plot(
630+
with=>'lines', $seq, zeroes(2), # x axis
631+
with=>'lines', style=>2, $seq, $y_seq,
632+
with=>'lines', style=>2, $seq, -$y_seq,
633+
(map +(with=>'lines', ones(2)*$_, pdl(0, $r->slice("($_)"))), 0..$h), { xlabel=>'lag', ylabel=>'acf', }
634+
);
635+
$r;
636636
}
637637

638638
=head1 REFERENCES

0 commit comments

Comments
 (0)