mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-05 22:11:12 +08:00
don't try to plot empty curves
Ignore-this: 8595770256deec271d0a7715a0e1ed14 darcs-hash:20090811211124-0cb85-8e26b73e0bb0071e246d2fe80512203c1152ac1f.gz
This commit is contained in:
parent
0dab1a0ec0
commit
13d6528473
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user