Merge branch 'master' into debian

This commit is contained in:
Dima Kogan 2013-12-04 01:59:56 -08:00
commit 48fb730f0b
12 changed files with 260 additions and 367 deletions

View File

@ -1,3 +1,11 @@
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

@ -13,7 +13,7 @@ use Thread::Queue;
use Pod::Usage;
use Time::Piece;
my $VERSION = 1.26;
my $VERSION = 1.27;
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):

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)

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
}