Compare commits

...

11 Commits

Author SHA1 Message Date
Dima Kogan
2fd23ed446 initial tests 2015-08-29 12:09:53 -07:00
Dima Kogan
9d98b84546 even streaming feedgnuplots persist
When the data-feeding pipe dies (data source exits) I still want to see the
realtime plot, as it appeared at the end
2015-06-22 17:03:30 -07:00
Dima Kogan
5609773b5b slighly fancier histogram recipe 2015-06-20 12:55:35 -07:00
Dima Kogan
ac06d5410a changelog bump 2014-10-10 14:05:31 -07:00
Dima Kogan
199796d874 Depends now works with the 'gnuplot5' packages
There's now a family of 'gnuplot5' packages in addition to the 'gnuplot' ones. I
now Depend on either one or on a generic "gnuplot" fallback.
2014-10-10 14:05:05 -07:00
Dima Kogan
a9d1b533fb changelog bump 2014-08-06 15:20:07 -07:00
Dima Kogan
0f0e51a159 by default I depend on "gnuplot-nox", not "gnuplot"
It turns out that the "base" gnuplot package that all flavors provide is called
"gnuplot-nox". So paradoxically, "gnuplot-x11" Provides "gnuplot-nox". I had my
dependency set up such that "gnuplot-nox" would not satisfy feedgnuplot. It does
now
2014-08-06 15:19:14 -07:00
Dima Kogan
73ed9b545a Merge tag 'v1.34' into debian 2014-08-06 15:16:17 -07:00
Dima Kogan
498047e785 version bump 2014-05-14 00:45:49 -07:00
Dima Kogan
72adba82f7 Declaring feedgnuplot as a package to pacify the MetaCPAN indexer
Hopefully this is sufficient. We'll see

https://github.com/dkogan/feedgnuplot/pull/16
https://github.com/CPAN-API/metacpan-web/issues/1148
https://github.com/CPAN-API/metacpan-web/issues/1170
https://github.com/CPAN-API/metacpan-web/issues/994
2014-05-14 00:43:13 -07:00
Corey Putkunz
539b2035d8 Fix for "Use of implicit split to @_ is deprecated at /d/home/coreyp/bin/feedgnuplot line 377" 2014-04-07 10:20:57 +08:00
4 changed files with 52 additions and 14 deletions

10
Changes
View File

@@ -1,3 +1,13 @@
feedgnuplot (1.34)
* Fix for "Use of implicit split to @_ is deprecated". Thanks to Corey
Putkunz
* Declaring feedgnuplot as a package to let MetaCPAN index this
distribution
-- Dima Kogan <dima@secretsauce.net> Wed, 14 May 2014 00:45:24 -0700
feedgnuplot (1.33)
* fixed incorrect plotting of --timefmt --rangesize plots

View File

@@ -1,4 +1,7 @@
#!/usr/bin/perl
package feedgnuplot; # for the metacpan indexer
use strict;
use warnings;
use Getopt::Long;
@@ -13,7 +16,7 @@ use Thread::Queue;
use Pod::Usage;
use Time::Piece;
my $VERSION = 1.33;
my $VERSION = 1.34;
my %options;
interpretCommandline();
@@ -371,7 +374,7 @@ sub interpretCommandline
$options{timefmt} =~ s/^\s*//;
$options{timefmt} =~ s/\s*$//;
my $Nfields = scalar split( ' ', $options{timefmt});
my $Nfields = () = split /\s+/, $options{timefmt}, -1;
$options{timefmt_Ncols} = $Nfields;
# make sure --xlen is an integer. With a timefmt xlen goes through strptime
@@ -452,9 +455,11 @@ sub makeDomainNumeric
sub mainThread
{
local *PIPE;
pipe my ($pipe_readdata, $pipe_writedata);
my $dopersist = '';
if( !$options{stream} && getGnuplotVersion() >= 4.3)
if( getGnuplotVersion() >= 4.3)
{
$dopersist = '--persist';
}
@@ -641,7 +646,8 @@ sub mainThread
if(/^replot/o )
{
# /timertick/ determines if the timer was the source of the replot
replot( $domain0_numeric, /timertick/ );
replot( $pipe_readdata, $pipe_writedata,
$domain0_numeric, /timertick/ );
next;
}
@@ -697,7 +703,8 @@ sub mainThread
# the x-coordinate of the new point is in the past, so I wipe out
# all the data and start anew. Before I wipe the old data, I
# replot the old data
replot( $domain0_numeric );
replot( $pipe_readdata, $pipe_writedata,
$domain0_numeric );
clearCurves();
$latestX = undef;
}
@@ -756,7 +763,7 @@ sub mainThread
}
# finished reading in all. Plot what we have
plotStoredData();
plotStoredData($pipe_readdata, $pipe_writedata);
if ( defined $options{hardcopy})
{
@@ -816,18 +823,22 @@ sub pruneOldData
sub plotStoredData
{
my ($pipe_readdata, $pipe_writedata) = @_;
# get the options for those curves that havse any data
my @nonemptyCurves = grep { $_->{datastring} } @curves;
my @extraopts = map {$_->{options}} @nonemptyCurves;
my $body = join(', ' , map({ "'-' $_" } @extraopts) );
my $fd = fileno $pipe_readdata;
my $body = join(', ' , map({ "'<&$fd' $_" } @extraopts) );
if($options{'3d'}) { print PIPE "splot $body\n"; }
else { print PIPE "plot $body\n"; }
foreach my $curve (@nonemptyCurves)
{
print PIPE $curve->{datastring};
print PIPE "e\n";
print $pipe_writedata $curve->{datastring};
print $pipe_writedata "e\n";
}
}
@@ -974,7 +985,8 @@ sub replot
# }
my ($domain0_numeric, $replot_is_from_timer) = @_;
my ($pipe_readdata, $pipe_writedata,
$domain0_numeric, $replot_is_from_timer) = @_;
my $now = [gettimeofday];
@@ -1005,7 +1017,7 @@ sub replot
sendRangeCommand( "xrange", $xmin, $xmax );
}
plotStoredData();
plotStoredData($pipe_readdata, $pipe_writedata);
# update replot state
@@ -1754,10 +1766,12 @@ in a Thinkpad.
$ while true; do cat /proc/acpi/ibm/thermal | awk '{$1=""; print}' ; sleep 1; done |
feedgnuplot --stream --xlen 100 --lines --autolegend --ymax 100 --ymin 20 --ylabel 'Temperature (deg C)'
=head2 Plotting a histogram of file sizes in a directory
=head2 Plotting a histogram of file sizes in a directory, granular to 10MB
$ ls -l | awk '{print $5/1e6}' |
feedgnuplot --histogram 0 --with boxes --ymin 0 --xlabel 'File size (MB)' --ylabel Frequency
feedgnuplot --histogram 0 --with boxes
--binwidth 10 --set 'style fill solid'
--ymin 0 --xlabel 'File size (MB)' --ylabel Frequency
=head1 ACKNOWLEDGEMENT

13
debian/changelog vendored
View File

@@ -1,3 +1,16 @@
feedgnuplot (1.34-2) unstable; urgency=medium
* Depends now works with the 'gnuplot5' packages
-- Dima Kogan <dima@secretsauce.net> Fri, 10 Oct 2014 14:05:17 -0700
feedgnuplot (1.34-1) unstable; urgency=medium
* Very minor upstream update
* gnuplot-nox can no satisfy the gnuplot dependency for feedgnuplot
-- Dima Kogan <dima@secretsauce.net> Wed, 06 Aug 2014 15:19:56 -0700
feedgnuplot (1.33-1) unstable; urgency=low
* Upstream update: fixed incorrect plotting of --timefmt --rangesize

3
debian/control vendored
View File

@@ -11,7 +11,8 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/feedgnu
Package: feedgnuplot
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, gnuplot-qt | gnuplot-x11 | gnuplot
Depends: ${misc:Depends}, ${perl:Depends},
gnuplot-qt | gnuplot-x11 | gnuplot-nox | gnuplot5-qt | gnuplot5-x11 | gnuplot5-nox | 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