mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-05 22:11:12 +08:00
gnuplot driver can parse scientific notation
Ignore-this: 9c3fa6a5d1974f806ff6cd587c3af5b5 darcs-hash:20090806185938-0cb85-0d54fd39632f145019e923dc9123bc297bbf37fd.gz
This commit is contained in:
parent
a8bb73ec90
commit
37667ddec3
@ -149,11 +149,14 @@ sub main {
|
||||
my $streamIdx = 0;
|
||||
select((select(STDOUT), $| = 1)[0]);
|
||||
my $xlast = 0;
|
||||
|
||||
# regexp for a possibly floating point, possibly scientific notation number
|
||||
my $numRE = qr/([-]?[0-9\.]+(?:e[-]?[0-9]+)?)/;
|
||||
while(<>)
|
||||
{
|
||||
chomp;
|
||||
my $line = $_;
|
||||
foreach my $point ($line =~ /([-]?[0-9\.]+)/g) {
|
||||
foreach my $point ($line =~ /$numRE/g) {
|
||||
my $buf = $buffers[$streamIdx];
|
||||
|
||||
# data buffering (up to stream sample size)
|
||||
|
Loading…
Reference in New Issue
Block a user