Compare commits

..

6 Commits

Author SHA1 Message Date
Dima Kogan
235de3d5d1 version bump 2013-12-04 02:01:19 -08:00
Dima Kogan
198122431f first example now shows an ASCII plot 2013-12-04 00:11:43 -08:00
Dima Kogan
dd8bc8995d version bump 2013-12-03 23:38:18 -08:00
Dima Kogan
cc0b41e270 Some tests aren't 100% reliable, and are no longer included in automated testing
These are:

- Histogram and circle-plotting tests: these have inconsistent round-off
  behavior on different arches; specifically 32-bit and 64-bit x86. So both
  plots look fine, but not identical, thus the tests fail

- Streaming tests. These tests have a temporal component, so the loading of
  the host machine can cause a test failure. It's fine pretty much all the
  time on my not-too-new laptop, but this is bad for automated testing

The RUN_ALL_TESTS environment variable can be set to turn all ALL tests
2013-12-02 21:26:32 -08:00
Dima Kogan
1f757d1db1 reordered some unit tests 2013-12-02 21:16:00 -08:00
Dima Kogan
84a8daa56a removed example debianization, since debian itself now has it 2013-11-30 01:59:38 -08:00
26 changed files with 268 additions and 522 deletions

14
Changes
View File

@@ -1,3 +1,17 @@
feedgnuplot (1.28)
* Minor POD update
-- Dima Kogan <dima@secretsauce.net> Wed, 04 Dec 2013 02:01:05 -0800
feedgnuplot (1.27)
* Disabled tests that can fail on some arches (can be re-enabled with
environment variable)
* Removed sample debianization; this program is now in Debian proper
-- Dima Kogan <dima@secretsauce.net> Tue, 03 Dec 2013 23:37:40 -0800
feedgnuplot (1.26)
* Minor POD fixes

12
INSTALL
View File

@@ -1,17 +1,9 @@
If running on a Debian-based OS (this includes Ubuntu), it is highly recommended
to install this program as a package. In debian/unstable feedgnuplot is in the
official repos, so all you need to do is
to install this program as a package. In Debian and Ubuntu, feedgnuplot is in
the official repos, so all you need to do is
sudo apt-get install feedgnuplot
Otherwise a package can be built with
ln -fs package_definitions/debian debian
dpkg-buildpackage -us -uc -b
sudo dpkg -i ../feedgnuplot*.deb
This builds a debian package and installs it.
Without a package, an installation can be done with
perl Makefile.PL prefix=/usr/local

View File

@@ -1,7 +1,6 @@
Makefile.PL
MANIFEST
bin/feedgnuplot
lib/App/feedgnuplot.pm
t/manifest.t
t/plots.t
Changes

View File

@@ -42,30 +42,14 @@ sub MY::libscan
# Don't install any symlinks (i.e. README.pod)
return undef if -l $file;
# Don't install any feedgnuplot.pm. This exists only to make CPAN index this
# distribution
return undef if $file =~ /feedgnuplot.pm/;
return $self->SUPER::libscan ($file);
}
# I want my manpage to go into the man section '1', NOT '1p'. Here I add a
# snippet to the end of the generated Makefile to force this
#
# I also generate the feedgnuplot.pm. This exists only to make CPAN index this
# distribution
sub MY::postamble
{
return <<'EOF'
MAN1EXT := 1
lib/App/feedgnuplot.pm: bin/feedgnuplot
mkdir -p lib/App
echo 'package App::feedgnuplot;' > $@
cat $^ >> $@
echo '1;' >> $@
dist: lib/App/feedgnuplot.pm
EOF
return "MAN1EXT := 1\n";
}
@@ -81,5 +65,5 @@ WriteMakefile
EXE_FILES => [ 'bin/feedgnuplot' ],
BUILD_REQUIRES => { 'String::ShellQuote' => 0},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'feedgnuplot-* lib' },
clean => { FILES => 'feedgnuplot-*' },
);

View File

@@ -13,7 +13,7 @@ use Thread::Queue;
use Pod::Usage;
use Time::Piece;
my $VERSION = 1.26;
my $VERSION = 1.28;
my %options;
interpretCommandline();
@@ -961,6 +961,47 @@ Simple plotting of piped data:
$ seq 5 | awk '{print 2*$1, $1*$1}' |
feedgnuplot --lines --points --legend 0 "data 0" --title "Test plot" --y2 1
--terminal 'dumb 80,40' --exit
Test plot
10 ++------+--------+-------+-------+-------+--------+-------+------*A 25
+ + + + + + + + **#+
| : : : : : : data 0+**A*** |
| : : : : : : :** # |
9 ++.......................................................**.##....|
| : : : : : : ** :# |
| : : : : : : ** # |
| : : : : : :** ##: ++ 20
8 ++................................................A....#..........|
| : : : : : **: # : |
| : : : : : ** : ## : |
| : : : : : ** :# : |
| : : : : :** B : |
7 ++......................................**......##................|
| : : : : ** : ## : : ++ 15
| : : : : ** : # : : |
| : : : :** : ## : : |
6 ++..............................*A.......##.......................|
| : : : ** : ##: : : |
| : : : ** : # : : : |
| : : :** : ## : : : ++ 10
5 ++......................**........##..............................|
| : : ** : #B : : : |
| : : ** : ## : : : : |
| : :** : ## : : : : |
4 ++...............A.......###......................................|
| : **: ##: : : : : |
| : ** : ## : : : : : ++ 5
| : ** : ## : : : : : |
| :** ##B# : : : : : |
3 ++.....**..####...................................................|
| **#### : : : : : : |
| **## : : : : : : : |
B** + + + + + + + +
2 A+------+--------+-------+-------+-------+--------+-------+------++ 0
1 1.5 2 2.5 3 3.5 4 4.5 5
Simple real-time plotting example: plot how much data is received on the wlan0
network interface in bytes/second (uses bash, awk and Linux):

42
debian/changelog vendored
View File

@@ -1,42 +0,0 @@
feedgnuplot (1.26-1) unstable; urgency=low
* Minor POD update
-- Dima Kogan <dima@secretsauce.net> Sun, 20 Oct 2013 01:19:51 -0700
feedgnuplot (1.25-1) unstable; urgency=low
* Added test suite
* Added initial support for --timefmt. Currently time/date data is
supported only at the x-axis domain
* Added --exit option for force feedgnuplot to return even if gnuplot
may not yet be done rendering (patch by Eric Schulte)
* Reformatted the documentation
* y2-axis curves no longer have a thicker line by default
* --hardcopy now handles piped output (gnuplot 'set output |process'
syntax)
-- Dima Kogan <dima@secretsauce.net> Sun, 20 Oct 2013 00:57:23 -0700
feedgnuplot (1.24-2) unstable; urgency=low
* Now building the html documentation from the correct POD source
-- Dima Kogan <dima@secretsauce.net> Sun, 28 Apr 2013 17:42:52 -0700
feedgnuplot (1.24-1) unstable; urgency=low
* Fixed regression in --monotonic. This works again now
* moved POD back into the main source file. This fixes the broken usage
messages
* added --version
* fixed watchfile to work with newer github pages
* priority now optional
-- Dima Kogan <dima@secretsauce.net> Fri, 08 Feb 2013 02:01:32 -0800
feedgnuplot (1.23-2) unstable; urgency=low
* Initial Debian release (Closes: #686413)
-- Dima Kogan <dima@secretsauce.net> Tue, 30 Oct 2012 11:14:01 -0700

1
debian/compat vendored
View File

@@ -1 +0,0 @@
9

19
debian/control vendored
View File

@@ -1,19 +0,0 @@
Source: feedgnuplot
Section: science
Priority: optional
Build-Depends: debhelper (>= 9), libstring-shellquote-perl, perl, gawk, gnuplot
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Uploaders: Dima Kogan <dima@secretsauce.net>, Anton Gladky <gladk@debian.org>
Standards-Version: 3.9.4
Homepage: https://github.com/dkogan/feedgnuplot
Vcs-Git: git://git.debian.org/git/debian-science/packages/feedgnuplot.git
Vcs-Browser: http://git.debian.org/?p=debian-science/packages/feedgnuplot.git
Package: feedgnuplot
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, gnuplot
Description: Pipe-oriented frontend to Gnuplot
Flexible, command-line-oriented frontend to Gnuplot. Creates plots from data
coming in on STDIN or given in a filename passed on the commandline. Various
data representations are supported, as is hardcopy output and streaming display
of live data.

24
debian/copyright vendored
View File

@@ -1,24 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/dkogan/feedgnuplot
Upstream-Contact: Dima Kogan, <dima@secretsauce.net>
Upstream-Name: feedgnuplot
Files: *
Copyright: 2011, Dima Kogan <dima@secretsauce.net>
License: Artistic or GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
On Debian GNU/Linux systems, the complete text of the Artistic License
can be found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
On Debian GNU/Linux systems, the complete text of version 1 of the
General Public License can be found in `/usr/share/common-licenses/GPL-1'.

View File

@@ -1,9 +0,0 @@
Document: feedgnuplot
Title: Feedgnuplot Manual
Author: Dima Kogan
Abstract: Formatted manpage for feedgnuplot
Section: Science/Data Analysis
Format: HTML
Index: /usr/share/doc/feedgnuplot/feedgnuplot.html
Files: /usr/share/doc/feedgnuplot/feedgnuplot.html

View File

@@ -1 +0,0 @@
feedgnuplot.html

View File

@@ -1,2 +0,0 @@
completions/bash/feedgnuplot /etc/bash_completion.d/
completions/zsh/_feedgnuplot /usr/share/zsh/vendor-completions

4
debian/gbp.conf vendored
View File

@@ -1,4 +0,0 @@
[DEFAULT]
debian-branch = debian
upstream-tag = v%(version)s
pristine-tar = True

12
debian/rules vendored
View File

@@ -1,12 +0,0 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_build:
dh_auto_build
pod2html --title=feedgnuplot bin/feedgnuplot > feedgnuplot.html
override_dh_auto_clean:
rm -rf feedgnuplot.html pod2htm*
dh_auto_clean

View File

@@ -1 +0,0 @@
3.0 (quilt)

4
debian/watch vendored
View File

@@ -1,4 +0,0 @@
version=3
opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \
https://github.com/dkogan/feedgnuplot/tags .*/v?(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
# Bart Martens <bartm@debian.org> Sat, 22 Dec 2012 12:54:18 +0000

View File

@@ -1,111 +0,0 @@
feedgnuplot (1.22) unstable; urgency=low
* removed --size option
-- Dima Kogan <dima@secretsauce.net> Mon, 03 Sep 2012 08:33:26 -0700
feedgnuplot (1.21) unstable; urgency=low
* removed the POD from the script to its own file
* fixed regression to allow no given extracmds, histogram or y2
options
-- Dima Kogan <dima@secretsauce.net> Sun, 02 Sep 2012 23:52:21 -0700
feedgnuplot (1.20) unstable; urgency=low
* no longer hardcoding 'x11' as the default terminal
* added histogram support
* generic terminals can now be requested
* --extracmds, --histogram, --y2 can now take comma-separated lists
-- Dima Kogan <dima@secretsauce.net> Fri, 31 Aug 2012 01:35:50 -0700
feedgnuplot (1.19) unstable; urgency=low
* added --geometry option to specify plot dimensions
-- Dima Kogan <dima@secretsauce.net> Sat, 11 Feb 2012 21:04:42 -0800
feedgnuplot (1.18) unstable; urgency=low
* data-ids can now include characters such as -. Any non-whitespace
works
-- Dima Kogan <dima@secretsauce.net> Tue, 27 Dec 2011 16:47:36 -0800
feedgnuplot (1.17) unstable; urgency=low
[ Dima Kogan ]
* POD: removed -Winteractive, since this was apparently a mawk-ism
* added zsh and bash completions to the package
[ Hermann Schwarting ]
* add build dependency libtest-script-run-perl
-- Dima Kogan <dima@secretsauce.net> Sun, 20 Nov 2011 19:17:22 -0800
feedgnuplot (1.16) unstable; urgency=low
* deb version parser now works for any package name
* Some POD fixes
* now building a native package
-- Dima Kogan <dima@secretsauce.net> Fri, 11 Nov 2011 00:10:18 -0800
feedgnuplot (1.15-2) unstable; urgency=low
* added source format for the debianization
* added configuration to let git-buildpackage build this package
* standards bump to make lintian happier
-- Dima Kogan <dima@secretsauce.net> Sun, 23 Oct 2011 13:38:15 -0700
feedgnuplot (1.15-1) unstable; urgency=low
* Renamed main script from feedGnuplot to feedgnuplot
* Slightly improved packaging, added instructions, etc
-- Dima Kogan <dima@secretsauce.net> Sun, 16 Oct 2011 11:58:15 -0700
feedgnuplot (1.14-1) unstable; urgency=low
* New upstream release (added 'clear' command, documented commands)
-- Dima Kogan <dima@secretsauce.net> Sun, 22 May 2011 15:25:28 -0700
feedgnuplot (1.13-1) unstable; urgency=low
* New upstream release (Better streaming plot control)
-- Dima Kogan <dima@secretsauce.net> Tue, 26 Apr 2011 14:24:09 -0700
feedgnuplot (1.12-1) unstable; urgency=low
* New upstream release
-- Dima Kogan <dima@secretsauce.net> Tue, 19 Apr 2011 11:02:23 -0700
feedgnuplot (1.11-1) unstable; urgency=low
* New upstream release
-- Dima Kogan <dima@secretsauce.net> Sat, 09 Apr 2011 14:10:21 -0700
feedgnuplot (1.10-1) unstable; urgency=low
* New upstream release
-- Dima Kogan <dima@secretsauce.net> Sat, 09 Apr 2011 14:08:06 -0700
feedgnuplot (1.09-1) unstable; urgency=low
* New upstream release
-- Dima Kogan <dima@secretsauce.net> Sun, 03 Apr 2011 17:23:38 -0700
feedgnuplot (1.08-1) unstable; urgency=low
* Initial debianized release.
-- Dima Kogan <dima@secretsauce.net> Sun, 6 Feb 2011 15:58:22 -0800

View File

@@ -1 +0,0 @@
7

View File

@@ -1,20 +0,0 @@
Source: feedgnuplot
Section: science
Priority: extra
Build-Depends: debhelper (>= 7), libtest-script-run-perl, perl
Maintainer: Dima Kogan <dima@secretsauce.net>
Uploaders: Dima Kogan <dima@secretsauce.net>
Standards-Version: 3.9.3
Homepage: https://github.com/dkogan/feedgnuplot
Vcs-Git: git://github.com/dkogan/feedgnuplot.git
Vcs-Browser: https://github.com/dkogan/feedgnuplot
DM-Upload-Allowed: yes
Package: feedgnuplot
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, gnuplot
Description: Pipe-oriented frontend to Gnuplot
Flexible, command-line-oriented frontend to Gnuplot. Creates plots from data
coming in on STDIN or given in a filename passed on the commandline. Various
data representations are supported, as is hardcopy output and streaming display
of live data.

View File

@@ -1,24 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/dkogan/feedgnuplot
Upstream-Contact: Dima Kogan, <dima@secretsauce.net>
Upstream-Name: feedgnuplot
Files: *
Copyright: 2011, Dima Kogan <dima@secretsauce.net>
License: Artistic or GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
On Debian GNU/Linux systems, the complete text of the Artistic License
can be found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
On Debian GNU/Linux systems, the complete text of version 1 of the
General Public License can be found in `/usr/share/common-licenses/GPL-1'.

View File

@@ -1,2 +0,0 @@
completions/bash/feedgnuplot /etc/bash_completion.d/
completions/zsh/_feedgnuplot /usr/share/zsh/vendor-completions

View File

@@ -1,5 +0,0 @@
[DEFAULT]
upstream-tree = branch
upstream-branch = master
debian-branch = master
debian-tag = debian-%(version)s

View File

@@ -1,4 +0,0 @@
#!/usr/bin/make -f
%:
dh $@

View File

@@ -1 +0,0 @@
3.0 (native)

View File

@@ -1,17 +0,0 @@
#!perl
use strict;
use Test::More tests => 1;
# Here I use my bogus package (which only exists for CPAN indexing), and make
# sure it works. This test is needless too, it just exists to satisfy CPAN
# checks
BEGIN{
require_ok 'App::feedgnuplot';
}
diag("App::feedgnuplot/$App::feedgnuplot::VERSION");
__DATA__

396
t/plots.t
View File

@@ -5,7 +5,9 @@
# change the way the output looks will show up as test failures. Currently the
# reference plots come from gnuplot 4.6.4, and I make sure this is the version
# we're testing with
#
# Note that some tests are only executed when the RUN_ALL_TESTS environment
# variable is set.
# require a threaded perl for my tests. This block lifted verbatim from the cpantesters wiki
BEGIN {
@@ -603,193 +605,6 @@ tryplot( testname => '3d spiral with bounds, labels, square xy aspect ratio',
EOF
tryplot( testname => 'Histogram plot',
cmd => q{seq 50 | awk '{print $1*$1}'},
options => [qw(--lines --points),
qw(--histo 0 --binwidth 50 --ymin 0 --curvestyleall), 'with boxes'],
refplot => <<'EOF' );
4 ++----------****----------+------------+-----------+------------+------------+-----------++
+ *+** + + + + + +
| * ** |
| * ** |
3.5 ++ * ** ++
| * ** |
| * ** |
| * ** |
| * ** |
3 ++ * *** ++
| * *** |
| * *** |
| * *** |
2.5 ++ * *** ++
| * *** |
| * *** |
| * *** |
2 ++ * **** *** ++
| * **** *** |
| * **** *** |
| * **** *** |
| * **** *** |
1.5 ++ * **** *** ++
| * **** *** |
| * **** *** |
| * **** *** |
1 ++ * ************************** ******** ************************** ** ++
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
0.5 ++ * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** ++
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
+ *+**** *** **** *** **** *** **** *** **** *** **** *** **** *** ** +
0 ++----------****************************-********-**************************-**----------++
-500 0 500 1000 1500 2000 2500 3000
EOF
tryplot( testname => 'Cumulative histogram',
cmd => q{seq 50 | awk '{print $1*$1}'},
options => [qw(--lines --points),
qw(--histo 0 --histstyle cum --binwidth 50 --ymin 0 --curvestyleall), 'with boxes'],
refplot => <<'EOF' );
50 ++-----------+------------+------------+------------+------------+-----------***----------++
+ + + + + + ** ***+* +
| **** *** * |
| *** **** *** * |
| ** *** **** *** * |
| ***** *** **** *** * |
| **** *** *** **** *** * |
40 ++ ** **** *** *** **** *** * ++
| ****** **** *** *** **** *** * |
| ***** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** * |
| ****** **** *** *** **** *** *** **** *** * |
30 ++ *** *** **** *** *** **** *** *** **** *** * ++
| ****** *** **** *** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** * |
| ****** **** *** *** **** *** *** **** *** *** **** *** * |
20 ++ *** *** **** *** *** **** *** *** **** *** *** **** *** * ++
| ****** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
10 ++ ** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * ++
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ***** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| * *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
+ *+*** **** ***+*** **** ***+*** **** ***+*** **** ***+*** **** ***+* +
0 ++----------********************************************-********+***-****-*****----------++
-500 0 500 1000 1500 2000 2500 3000
EOF
tryplot( testname => 'Circles',
cmd => q{seq 5 | awk '{print $1,$1,$1/10}'},
options => [qw(--circles --domain)],
refplot => <<'EOF' );
5 ++-------+--------+--------+--------+--------+--------+--------+--------*******************
+ + + + + + + + * + *+
| * * *|
| ******** * *|
4.5 ++ ** ** * *+
| ** ** ** **|
| ** ** ** ** |
| * * ** ** |
| * * ** ** |
4 ++ * ** ********** ++
| * * |
| * * |
| * * * |
3.5 ++ ****** ** ** ++
| * * ** ** |
| * * ** ** |
| * * ******** |
3 ++ * ** ++
| * * |
| * * |
| * * |
| * * |
2.5 ++ * ****** ++
| ****** |
| ** ** |
| * * |
2 ++ * ** ++
| * ** |
| * * |
| ** ** |
| ****** |
1.5 ++ ++
| |
| * |
+ **** + + + + + + + + +
1 ++-----*-+**------+--------+--------+--------+--------+--------+--------+--------+-------++
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
EOF
tryplot( testname => 'Error bars (using extraValuesPerPoint)',
cmd => q{seq 5 | awk '{print $1,$1,$1/10}'},
options => [qw(--domain),
qw(--extraValuesPerPoint 1 --curvestyle 0), 'with errorbars'],
refplot => <<'EOF' );
5.5 ++---------+-----------+----------+----------+----------+-----------+----------+---------**
+ + + + + + + + *
| *
5 ++ +A
| *
| *
| *
4.5 ++ **
| *** |
| * |
4 ++ A ++
| * |
| * |
| *** |
3.5 ++ ++
| *** |
| * |
3 ++ A ++
| * |
| * |
| *** |
2.5 ++ ++
| |
| *** |
2 ++ A ++
| * |
| *** |
| |
1.5 ++ ++
| |
| |
1 A* ++
** |
| |
+ + + + + + + + +
0.5 ++---------+-----------+----------+----------+----------+-----------+----------+---------++
1 1.5 2 2.5 3 3.5 4 4.5 5
EOF
tryplot( testname => 'Monotonicity check',
@@ -980,6 +795,210 @@ tryplot( testname => '--timefmt plot with --monotonic',
EOF
tryplot( testname => 'Error bars (using extraValuesPerPoint)',
cmd => q{seq 5 | awk '{print $1,$1,$1/10}'},
options => [qw(--domain),
qw(--extraValuesPerPoint 1 --curvestyle 0), 'with errorbars'],
refplot => <<'EOF' );
5.5 ++---------+-----------+----------+----------+----------+-----------+----------+---------**
+ + + + + + + + *
| *
5 ++ +A
| *
| *
| *
4.5 ++ **
| *** |
| * |
4 ++ A ++
| * |
| * |
| *** |
3.5 ++ ++
| *** |
| * |
3 ++ A ++
| * |
| * |
| *** |
2.5 ++ ++
| |
| *** |
2 ++ A ++
| * |
| *** |
| |
1.5 ++ ++
| |
| |
1 A* ++
** |
| |
+ + + + + + + + +
0.5 ++---------+-----------+----------+----------+----------+-----------+----------+---------++
1 1.5 2 2.5 3 3.5 4 4.5 5
EOF
SKIP:
{
# Some tests aren't 100% reliable, so I do not include them in automated testing. These are
#
# - Histogram and circle-plotting tests: these have inconsistent round-off
# behavior on different arches; specifically 32-bit and 64-bit x86. So both
# plots look fine, but not identical, thus the tests fail
#
# - Streaming tests. These tests have a temporal component, so the loading of
# the host machine can cause a test failure. It's fine pretty much all the
# time on my not-too-new laptop, but this is bad for automated testing
skip "Skipping unreliable tests. Set RUN_ALL_TESTS environment variable to run them all", 18 unless $ENV{RUN_ALL_TESTS};
tryplot( testname => 'Histogram plot',
cmd => q{seq 50 | awk '{print $1*$1}'},
options => [qw(--lines --points),
qw(--histo 0 --binwidth 50 --ymin 0 --curvestyleall), 'with boxes'],
refplot => <<'EOF' );
4 ++----------****----------+------------+-----------+------------+------------+-----------++
+ *+** + + + + + +
| * ** |
| * ** |
3.5 ++ * ** ++
| * ** |
| * ** |
| * ** |
| * ** |
3 ++ * *** ++
| * *** |
| * *** |
| * *** |
2.5 ++ * *** ++
| * *** |
| * *** |
| * *** |
2 ++ * **** *** ++
| * **** *** |
| * **** *** |
| * **** *** |
| * **** *** |
1.5 ++ * **** *** ++
| * **** *** |
| * **** *** |
| * **** *** |
1 ++ * ************************** ******** ************************** ** ++
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
0.5 ++ * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** ++
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
| * **** *** **** *** **** *** **** *** **** *** **** *** **** *** ** |
+ *+**** *** **** *** **** *** **** *** **** *** **** *** **** *** ** +
0 ++----------****************************-********-**************************-**----------++
-500 0 500 1000 1500 2000 2500 3000
EOF
tryplot( testname => 'Cumulative histogram',
cmd => q{seq 50 | awk '{print $1*$1}'},
options => [qw(--lines --points),
qw(--histo 0 --histstyle cum --binwidth 50 --ymin 0 --curvestyleall), 'with boxes'],
refplot => <<'EOF' );
50 ++-----------+------------+------------+------------+------------+-----------***----------++
+ + + + + + ** ***+* +
| **** *** * |
| *** **** *** * |
| ** *** **** *** * |
| ***** *** **** *** * |
| **** *** *** **** *** * |
40 ++ ** **** *** *** **** *** * ++
| ****** **** *** *** **** *** * |
| ***** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** * |
| ****** **** *** *** **** *** *** **** *** * |
30 ++ *** *** **** *** *** **** *** *** **** *** * ++
| ****** *** **** *** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** * |
| ****** **** *** *** **** *** *** **** *** *** **** *** * |
20 ++ *** *** **** *** *** **** *** *** **** *** *** **** *** * ++
| ****** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ****** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
10 ++ ** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * ++
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| ***** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
| * *** **** *** *** **** *** *** **** *** *** **** *** *** **** *** * |
+ *+*** **** ***+*** **** ***+*** **** ***+*** **** ***+*** **** ***+* +
0 ++----------********************************************-********+***-****-*****----------++
-500 0 500 1000 1500 2000 2500 3000
EOF
tryplot( testname => 'Circles',
cmd => q{seq 5 | awk '{print $1,$1,$1/10}'},
options => [qw(--circles --domain)],
refplot => <<'EOF' );
5 ++-------+--------+--------+--------+--------+--------+--------+--------*******************
+ + + + + + + + * + *+
| * * *|
| ******** * *|
4.5 ++ ** ** * *+
| ** ** ** **|
| ** ** ** ** |
| * * ** ** |
| * * ** ** |
4 ++ * ** ********** ++
| * * |
| * * |
| * * * |
3.5 ++ ****** ** ** ++
| * * ** ** |
| * * ** ** |
| * * ******** |
3 ++ * ** ++
| * * |
| * * |
| * * |
| * * |
2.5 ++ * ****** ++
| ****** |
| ** ** |
| * * |
2 ++ * ** ++
| * ** |
| * * |
| ** ** |
| ****** |
1.5 ++ ++
| |
| * |
+ **** + + + + + + + + +
1 ++-----*-+**------+--------+--------+--------+--------+--------+--------+--------+-------++
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
EOF
@@ -2149,6 +2168,7 @@ tryplot( testname => '--timefmt streaming plot with --monotonic',
EOF
}