From 62f8a295009b81ca8d399f47934355aa2771e25e Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 6 Jan 2011 19:05:49 -0800 Subject: [PATCH] fixed broken plotting when a realtime plot has some curves run out of data --- feedGnuplot.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/feedGnuplot.pl b/feedGnuplot.pl index 89d82b4..3215514 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -556,7 +556,10 @@ sub pruneOldData if( @$xy > 1 ) { my $firstInWindow = first_index {$_->[0] >= $oldestx} @{$xy}[1..$#$xy]; - splice( @$xy, 1, $firstInWindow ) unless $firstInWindow == -1; + if($firstInWindow == -1) + { splice( @$xy, 1); } + else + { splice( @$xy, 1, $firstInWindow ); } } } }