mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-09-21 05:08:06 +08:00
Compare commits
5 Commits
data_over_
...
stir_noper
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fa997f2c16 | ||
![]() |
62a38826ee | ||
![]() |
8cc51461a3 | ||
![]() |
0c32afacfd | ||
![]() |
1688496f34 |
@@ -75,6 +75,7 @@ if($options{stream})
|
|||||||
}
|
}
|
||||||
|
|
||||||
$streamingFinished = 1;
|
$streamingFinished = 1;
|
||||||
|
$dataQueue->enqueue(undef);
|
||||||
|
|
||||||
$plotThr->join() if defined $plotThr;
|
$plotThr->join() if defined $plotThr;
|
||||||
$addThr->join();
|
$addThr->join();
|
||||||
@@ -413,8 +414,6 @@ sub plotUpdateThread
|
|||||||
# indicate that the timer was the replot source
|
# indicate that the timer was the replot source
|
||||||
$dataQueue->enqueue('replot timertick');
|
$dataQueue->enqueue('replot timertick');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dataQueue->enqueue(undef);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub sendRangeCommand
|
sub sendRangeCommand
|
||||||
@@ -455,14 +454,6 @@ sub makeDomainNumeric
|
|||||||
sub mainThread
|
sub mainThread
|
||||||
{
|
{
|
||||||
local *PIPE;
|
local *PIPE;
|
||||||
pipe my ($pipe_readdata, $pipe_writedata);
|
|
||||||
|
|
||||||
my $dopersist = '';
|
|
||||||
|
|
||||||
if( getGnuplotVersion() >= 4.3)
|
|
||||||
{
|
|
||||||
$dopersist = '--persist';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(exists $options{dump})
|
if(exists $options{dump})
|
||||||
{
|
{
|
||||||
@@ -472,7 +463,7 @@ sub mainThread
|
|||||||
{
|
{
|
||||||
my $geometry = defined $options{geometry} ?
|
my $geometry = defined $options{geometry} ?
|
||||||
"-geometry $options{geometry}" : '';
|
"-geometry $options{geometry}" : '';
|
||||||
open PIPE, "|gnuplot $geometry $dopersist" or die "Can't initialize gnuplot\n";
|
open PIPE, "|gnuplot $geometry" or die "Can't initialize gnuplot\n";
|
||||||
}
|
}
|
||||||
autoflush PIPE 1;
|
autoflush PIPE 1;
|
||||||
|
|
||||||
@@ -646,8 +637,7 @@ sub mainThread
|
|||||||
if(/^replot/o )
|
if(/^replot/o )
|
||||||
{
|
{
|
||||||
# /timertick/ determines if the timer was the source of the replot
|
# /timertick/ determines if the timer was the source of the replot
|
||||||
replot( $pipe_readdata, $pipe_writedata,
|
replot( $domain0_numeric, /timertick/ );
|
||||||
$domain0_numeric, /timertick/ );
|
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,8 +693,7 @@ sub mainThread
|
|||||||
# the x-coordinate of the new point is in the past, so I wipe out
|
# 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
|
# all the data and start anew. Before I wipe the old data, I
|
||||||
# replot the old data
|
# replot the old data
|
||||||
replot( $pipe_readdata, $pipe_writedata,
|
replot( $domain0_numeric );
|
||||||
$domain0_numeric );
|
|
||||||
clearCurves();
|
clearCurves();
|
||||||
$latestX = undef;
|
$latestX = undef;
|
||||||
}
|
}
|
||||||
@@ -763,7 +752,7 @@ sub mainThread
|
|||||||
}
|
}
|
||||||
|
|
||||||
# finished reading in all. Plot what we have
|
# finished reading in all. Plot what we have
|
||||||
plotStoredData($pipe_readdata, $pipe_writedata);
|
plotStoredData();
|
||||||
|
|
||||||
if ( defined $options{hardcopy})
|
if ( defined $options{hardcopy})
|
||||||
{
|
{
|
||||||
@@ -772,7 +761,7 @@ sub mainThread
|
|||||||
# sleep until the plot file exists, and it is closed. Sometimes the output
|
# sleep until the plot file exists, and it is closed. Sometimes the output
|
||||||
# is still being written at this point. If the output filename starts with
|
# is still being written at this point. If the output filename starts with
|
||||||
# '|', gnuplot pipes the output to that process, instead of writing to a
|
# '|', gnuplot pipes the output to that process, instead of writing to a
|
||||||
# file. In that case I don't make sure the file exists, since there IS not
|
# file. In that case I don't make sure the file exists, since there IS no
|
||||||
# file
|
# file
|
||||||
if( $options{hardcopy} !~ /^\|/ )
|
if( $options{hardcopy} !~ /^\|/ )
|
||||||
{
|
{
|
||||||
@@ -823,22 +812,18 @@ sub pruneOldData
|
|||||||
|
|
||||||
sub plotStoredData
|
sub plotStoredData
|
||||||
{
|
{
|
||||||
my ($pipe_readdata, $pipe_writedata) = @_;
|
|
||||||
|
|
||||||
# get the options for those curves that havse any data
|
# get the options for those curves that havse any data
|
||||||
my @nonemptyCurves = grep { $_->{datastring} } @curves;
|
my @nonemptyCurves = grep { $_->{datastring} } @curves;
|
||||||
my @extraopts = map {$_->{options}} @nonemptyCurves;
|
my @extraopts = map {$_->{options}} @nonemptyCurves;
|
||||||
|
|
||||||
my $fd = fileno $pipe_readdata;
|
my $body = join(', ' , map({ "'-' $_" } @extraopts) );
|
||||||
|
|
||||||
my $body = join(', ' , map({ "'<&$fd' $_" } @extraopts) );
|
|
||||||
if($options{'3d'}) { print PIPE "splot $body\n"; }
|
if($options{'3d'}) { print PIPE "splot $body\n"; }
|
||||||
else { print PIPE "plot $body\n"; }
|
else { print PIPE "plot $body\n"; }
|
||||||
|
|
||||||
foreach my $curve (@nonemptyCurves)
|
foreach my $curve (@nonemptyCurves)
|
||||||
{
|
{
|
||||||
print $pipe_writedata $curve->{datastring};
|
print PIPE $curve->{datastring};
|
||||||
print $pipe_writedata "e\n";
|
print PIPE "e\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -985,8 +970,7 @@ sub replot
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
||||||
my ($pipe_readdata, $pipe_writedata,
|
my ($domain0_numeric, $replot_is_from_timer) = @_;
|
||||||
$domain0_numeric, $replot_is_from_timer) = @_;
|
|
||||||
|
|
||||||
my $now = [gettimeofday];
|
my $now = [gettimeofday];
|
||||||
|
|
||||||
@@ -1017,7 +1001,7 @@ sub replot
|
|||||||
sendRangeCommand( "xrange", $xmin, $xmax );
|
sendRangeCommand( "xrange", $xmin, $xmax );
|
||||||
}
|
}
|
||||||
|
|
||||||
plotStoredData($pipe_readdata, $pipe_writedata);
|
plotStoredData();
|
||||||
|
|
||||||
|
|
||||||
# update replot state
|
# update replot state
|
||||||
@@ -1766,12 +1750,10 @@ in a Thinkpad.
|
|||||||
$ while true; do cat /proc/acpi/ibm/thermal | awk '{$1=""; print}' ; sleep 1; done |
|
$ 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)'
|
feedgnuplot --stream --xlen 100 --lines --autolegend --ymax 100 --ymin 20 --ylabel 'Temperature (deg C)'
|
||||||
|
|
||||||
=head2 Plotting a histogram of file sizes in a directory, granular to 10MB
|
=head2 Plotting a histogram of file sizes in a directory
|
||||||
|
|
||||||
$ ls -l | awk '{print $5/1e6}' |
|
$ ls -l | awk '{print $5/1e6}' |
|
||||||
feedgnuplot --histogram 0 --with boxes
|
feedgnuplot --histogram 0 --with boxes --ymin 0 --xlabel 'File size (MB)' --ylabel Frequency
|
||||||
--binwidth 10 --set 'style fill solid'
|
|
||||||
--ymin 0 --xlabel 'File size (MB)' --ylabel Frequency
|
|
||||||
|
|
||||||
=head1 ACKNOWLEDGEMENT
|
=head1 ACKNOWLEDGEMENT
|
||||||
|
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,8 +1,8 @@
|
|||||||
feedgnuplot (1.34-2) unstable; urgency=medium
|
feedgnuplot (1.34stir1-1) unstable; urgency=medium
|
||||||
|
|
||||||
* Depends now works with the 'gnuplot5' packages
|
* disabled --persist because on our arm board it confuses things
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Fri, 10 Oct 2014 14:05:17 -0700
|
-- Dima Kogan <dima@secretsauce.net> Fri, 22 Aug 2014 14:59:05 -0700
|
||||||
|
|
||||||
feedgnuplot (1.34-1) unstable; urgency=medium
|
feedgnuplot (1.34-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
3
debian/control
vendored
3
debian/control
vendored
@@ -11,8 +11,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/feedgnu
|
|||||||
|
|
||||||
Package: feedgnuplot
|
Package: feedgnuplot
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: ${misc:Depends}, ${perl:Depends},
|
Depends: ${misc:Depends}, ${perl:Depends}, gnuplot-qt | gnuplot-x11 | gnuplot-nox
|
||||||
gnuplot-qt | gnuplot-x11 | gnuplot-nox | gnuplot5-qt | gnuplot5-x11 | gnuplot5-nox | gnuplot
|
|
||||||
Description: Pipe-oriented frontend to Gnuplot
|
Description: Pipe-oriented frontend to Gnuplot
|
||||||
Flexible, command-line-oriented frontend to Gnuplot. Creates plots from data
|
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
|
coming in on STDIN or given in a filename passed on the commandline. Various
|
||||||
|
Reference in New Issue
Block a user