don't try to plot empty curves

Ignore-this: 8595770256deec271d0a7715a0e1ed14

darcs-hash:20090811211124-0cb85-8e26b73e0bb0071e246d2fe80512203c1152ac1f.gz
This commit is contained in:
Dima Kogan 2009-08-11 14:11:24 -07:00
parent 0dab1a0ec0
commit 13d6528473

View File

@ -230,12 +230,13 @@ sub plotStoredData
my ($xmin, $xmax) = @_;
print PIPE "set xrange [$xmin:$xmax]\n" if defined $xmin;
my @extraopts = map {$_->{"extraopts"}} @curves;
my @extraopts = map {$_->{"extraopts"}} grep {@{$_->{"data"}}} @curves;
print PIPE 'plot ' . join(', ' , map({ '"-"' . $_} @extraopts) ) . "\n";
foreach my $curve (@curves)
{
my $buf = $curve->{"data"};
next unless @$buf;
for my $elem (@$buf) {
my ($x, $y) = @$elem;
print PIPE "$x $y\n";