fix handling of empty curves

Ignore-this: b898c03e4df23a2d9c6c5fad7065aff4

darcs-hash:20090915194423-0cb85-e00bbfe44ec500ed844e2275571a9170bcd5e4aa.gz
This commit is contained in:
Dima Kogan 2009-09-15 12:44:23 -07:00
parent 33f62a8438
commit 3e6fabaf97

View File

@ -268,11 +268,12 @@ sub plotStoredData
print PIPE "set xrange [$xmin:$xmax]\n" if defined $xmin; print PIPE "set xrange [$xmin:$xmax]\n" if defined $xmin;
# get the options for those curves that have any data # get the options for those curves that have any data
my @extraopts = map {$_->[0]} grep {@$_ > 1} @curves; my @nonemptyCurves = grep {@$_ > 1} @curves;
my @extraopts = map {$_->[0]} @nonemptyCurves;
print PIPE 'plot ' . join(', ' , map({ '"-"' . $_} @extraopts) ) . "\n"; print PIPE 'plot ' . join(', ' , map({ '"-"' . $_} @extraopts) ) . "\n";
foreach my $buf (@curves) foreach my $buf (@nonemptyCurves)
{ {
# send each point to gnuplot. Ignore the first "point" since it's the # send each point to gnuplot. Ignore the first "point" since it's the
# options string # options string