mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
added 'clear' string to allow the data to purge itself
This commit is contained in:
parent
de242bad32
commit
70f508ece6
@ -403,7 +403,10 @@ sub mainThread
|
||||
{
|
||||
next if /^#/o;
|
||||
|
||||
if($_ !~ /^replot/o)
|
||||
if( $options{stream} && /^clear/o )
|
||||
{ clearCurves(); }
|
||||
|
||||
if(! /^replot/o)
|
||||
{
|
||||
# parse the incoming data lines. The format is
|
||||
# x id0 dat0 id1 dat1 ....
|
||||
@ -606,6 +609,13 @@ sub setCurveLabel
|
||||
updateCurveOptions($curve->[0], $id);
|
||||
}
|
||||
|
||||
# remove all the curve data
|
||||
sub clearCurves
|
||||
{
|
||||
foreach my $curve(@curves)
|
||||
{ splice( @$curve, 1 ); }
|
||||
}
|
||||
|
||||
# function to add a point to the plot. Assumes that the curve indexed by $idx already exists
|
||||
sub pushPoint
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user