mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-09-19 03:38:08 +08:00
Compare commits
112 Commits
v1.46
...
debian/1.4
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6f4816efd5 | ||
![]() |
008dc01d17 | ||
![]() |
fc1a8af4bf | ||
![]() |
4da7705077 | ||
![]() |
b76c18a92d | ||
![]() |
8ad58134e1 | ||
![]() |
e6cb0830e8 | ||
![]() |
1e51157c0b | ||
![]() |
9a476c6429 | ||
![]() |
e064c29daa | ||
![]() |
3d85dba82a | ||
![]() |
f6a20cf8d8 | ||
![]() |
9497e9d751 | ||
![]() |
f9174031cc | ||
![]() |
ab26e54e20 | ||
![]() |
9d98b84546 | ||
![]() |
5609773b5b | ||
![]() |
ac06d5410a | ||
![]() |
199796d874 | ||
![]() |
a9d1b533fb | ||
![]() |
0f0e51a159 | ||
![]() |
73ed9b545a | ||
![]() |
10987c5187 | ||
![]() |
9ae728805d | ||
![]() |
f790ac4683 | ||
![]() |
af94ddf457 | ||
![]() |
abc37bfa1e | ||
![]() |
19c56ae041 | ||
![]() |
417ceb2bcc | ||
![]() |
a374e71fae | ||
![]() |
0551483616 | ||
![]() |
48fb730f0b | ||
![]() |
2fbc8f62d3 | ||
![]() |
670a5b84f9 | ||
![]() |
b92093464b | ||
![]() |
516077cbd0 | ||
![]() |
f8e69778a2 | ||
![]() |
7dca5c31bf | ||
![]() |
a6fef8c9f4 | ||
![]() |
987b7d90be | ||
![]() |
d7e30ac655 | ||
![]() |
ece4b29a2a | ||
![]() |
bbd2a44bf9 | ||
![]() |
d2613db253 | ||
![]() |
2217a1a1ba | ||
![]() |
184102a420 | ||
![]() |
1cca6c8eb4 | ||
![]() |
78368597c8 | ||
![]() |
4de5984551 | ||
![]() |
512d515ff6 | ||
![]() |
1d1b5e6808 | ||
![]() |
40b18cf8f9 | ||
![]() |
5283810abe | ||
![]() |
9ab429e618 | ||
![]() |
14a39b6fd2 | ||
![]() |
d705699459 | ||
![]() |
8867cf54f0 | ||
![]() |
52b9024320 | ||
![]() |
6809545a16 | ||
![]() |
a66e45adb5 | ||
![]() |
8557cd4870 | ||
![]() |
88fbd90a28 | ||
![]() |
d9906d8e88 | ||
![]() |
186b7a3ae0 | ||
![]() |
62eb5f17bb | ||
![]() |
a164c4ff29 | ||
![]() |
30d5b10fd6 | ||
![]() |
f2d4b7d78b | ||
![]() |
00d2f0d6a6 | ||
![]() |
0ccffde918 | ||
![]() |
805060ba92 | ||
![]() |
6ba7fc053c | ||
![]() |
21c38efc2d | ||
![]() |
7833e63c32 | ||
![]() |
d9e5067f20 | ||
![]() |
44a81e153d | ||
![]() |
458367883a | ||
![]() |
d4997cbba7 | ||
![]() |
5dcffaa62d | ||
![]() |
5cf323a97c | ||
![]() |
229c08582d | ||
![]() |
04876fa72e | ||
![]() |
e61e831ef2 | ||
![]() |
e5973e4fd6 | ||
![]() |
df2c78a85e | ||
![]() |
472520fdd8 | ||
![]() |
54f7f17558 | ||
![]() |
a8dc63c472 | ||
![]() |
10a4d35e97 | ||
![]() |
70946c92c2 | ||
![]() |
a8f5b99c23 | ||
![]() |
5cb7e3616a | ||
![]() |
b9ce0ea175 | ||
![]() |
d6381c747b | ||
![]() |
a054645a71 | ||
![]() |
0ce0f8a3f0 | ||
![]() |
3171f272fc | ||
![]() |
1cced9a621 | ||
![]() |
3132b76caa | ||
![]() |
b90e783f69 | ||
![]() |
9b0bc07ae4 | ||
![]() |
7bcb3920a1 | ||
![]() |
0ec6cb3d6d | ||
![]() |
9edb99d4cd | ||
![]() |
a1fac377a8 | ||
![]() |
80a5fac5f2 | ||
![]() |
f6fc00f3f2 | ||
![]() |
02d3f2bc92 | ||
![]() |
f682fa0816 | ||
![]() |
1e63a87a3d | ||
![]() |
47846ea562 | ||
![]() |
36d1db13a3 |
42
Changes
42
Changes
@@ -1,41 +1,3 @@
|
|||||||
feedgnuplot (1.46)
|
|
||||||
|
|
||||||
* Added --tuplesize and --tuplesizeall as alternatives to --rangesize
|
|
||||||
and --rangesizeall. Both forms are supported.
|
|
||||||
* Vnlog integration
|
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Thu, 22 Feb 2018 23:37:54 -0800
|
|
||||||
|
|
||||||
feedgnuplot (1.45)
|
|
||||||
|
|
||||||
* zsh completion: --hardcopy, --image suggest filenames
|
|
||||||
* --image now produces a nicer legend: just the filename
|
|
||||||
* --curvestyle now overrides --curvestyleall
|
|
||||||
- This is a bug fix
|
|
||||||
* The version is now treated as a string not as a number
|
|
||||||
- So "1.40" is distinct from "1.4"
|
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Sun, 29 Oct 2017 13:56:28 -0700
|
|
||||||
|
|
||||||
feedgnuplot (1.44)
|
|
||||||
|
|
||||||
* --image draws its output beneath everything else
|
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Tue, 20 Jun 2017 16:44:30 -0700
|
|
||||||
|
|
||||||
feedgnuplot (1.43)
|
|
||||||
|
|
||||||
* Added --image
|
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Mon, 19 Jun 2017 13:12:38 -0700
|
|
||||||
|
|
||||||
feedgnuplot (1.42)
|
|
||||||
|
|
||||||
* Data can now come from STDIN or files on the cmdline.
|
|
||||||
This fixes a regression. Self-plotting data files work again
|
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Fri, 31 Mar 2017 15:38:47 -0700
|
|
||||||
|
|
||||||
feedgnuplot (1.41)
|
feedgnuplot (1.41)
|
||||||
|
|
||||||
* Histograms: --xlen can coexist with --xmin/--xmax
|
* Histograms: --xlen can coexist with --xmin/--xmax
|
||||||
@@ -62,8 +24,8 @@ feedgnuplot (1.39)
|
|||||||
feedgnuplot (1.38)
|
feedgnuplot (1.38)
|
||||||
|
|
||||||
* hardcopy defaults:
|
* hardcopy defaults:
|
||||||
- no enhanced text mode
|
- no enhanced text mode
|
||||||
- larger font size
|
- larger font size
|
||||||
|
|
||||||
-- Dima Kogan <dima@secretsauce.net> Wed, 27 Jul 2016 22:15:11 -0700
|
-- Dima Kogan <dima@secretsauce.net> Wed, 27 Jul 2016 22:15:11 -0700
|
||||||
|
|
||||||
|
@@ -20,9 +20,9 @@ sub parseversion
|
|||||||
|
|
||||||
while(<PL>)
|
while(<PL>)
|
||||||
{
|
{
|
||||||
if( /VERSION = '([0-9\.]+)'/ )
|
if( /VERSION = ([0-9\.]+)/ )
|
||||||
{
|
{
|
||||||
if ( $1 ne $version )
|
if ( $1 != $version )
|
||||||
{
|
{
|
||||||
die "Version mismatch. Changes says version is '$version', but 'bin/feedgnuplot' says it is '$1'";
|
die "Version mismatch. Changes says version is '$version', but 'bin/feedgnuplot' says it is '$1'";
|
||||||
}
|
}
|
||||||
|
482
bin/feedgnuplot
482
bin/feedgnuplot
@@ -15,8 +15,7 @@ use Text::ParseWords; # for shellwords
|
|||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
use Time::Piece;
|
use Time::Piece;
|
||||||
|
|
||||||
# Makefile.PL assumes this is in ''
|
my $VERSION = 1.41;
|
||||||
my $VERSION = '1.46';
|
|
||||||
|
|
||||||
my %options;
|
my %options;
|
||||||
interpretCommandline();
|
interpretCommandline();
|
||||||
@@ -42,10 +41,17 @@ my $last_replot_time = [gettimeofday];
|
|||||||
|
|
||||||
# whether the previous replot was timer based
|
# whether the previous replot was timer based
|
||||||
my $last_replot_is_from_timer = 1;
|
my $last_replot_is_from_timer = 1;
|
||||||
|
|
||||||
|
|
||||||
|
my $prev_timed_replot_time = [gettimeofday];
|
||||||
my $this_replot_is_from_timer;
|
my $this_replot_is_from_timer;
|
||||||
|
my $stdin = IO::Handle->new();
|
||||||
|
die "Couldn't open STDIN" unless $stdin->fdopen(fileno(STDIN),"r");
|
||||||
|
my $selector = IO::Select->new( $stdin );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mainThread();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -102,24 +108,21 @@ sub interpretCommandline
|
|||||||
$options{with} = '';
|
$options{with} = '';
|
||||||
|
|
||||||
$options{rangesize} = [];
|
$options{rangesize} = [];
|
||||||
$options{tuplesize} = [];
|
|
||||||
|
|
||||||
GetOptions(\%options, 'stream:s', 'domain!', 'dataid!', 'vnlog!', '3d!', 'colormap!', 'lines!', 'points!',
|
GetOptions(\%options, 'stream:s', 'domain!', 'dataid!', '3d!', 'colormap!', 'lines!', 'points!',
|
||||||
'circles', 'legend=s{2}', 'autolegend!', 'xlabel=s', 'ylabel=s', 'y2label=s', 'zlabel=s',
|
'circles', 'legend=s{2}', 'autolegend!', 'xlabel=s', 'ylabel=s', 'y2label=s', 'zlabel=s',
|
||||||
'title=s', 'xlen=f', 'ymin=f', 'ymax=f', 'xmin=s', 'xmax=s', 'y2min=f', 'y2max=f',
|
'title=s', 'xlen=f', 'ymin=f', 'ymax=f', 'xmin=s', 'xmax=s', 'y2min=f', 'y2max=f',
|
||||||
'zmin=f', 'zmax=f', 'y2=s@',
|
'zmin=f', 'zmax=f', 'y2=s@',
|
||||||
'style=s{2}', 'curvestyle=s{2}', 'curvestyleall=s', 'styleall=s', 'with=s', 'extracmds=s@', 'set=s@', 'unset=s@',
|
'style=s{2}', 'curvestyle=s{2}', 'curvestyleall=s', 'styleall=s', 'with=s', 'extracmds=s@', 'set=s@', 'unset=s@',
|
||||||
'square!', 'square_xy!', 'hardcopy=s', 'maxcurves=i', 'monotonic!', 'timefmt=s',
|
'square!', 'square_xy!', 'hardcopy=s', 'maxcurves=i', 'monotonic!', 'timefmt=s',
|
||||||
'equation=s@',
|
'equation=s@',
|
||||||
'image=s',
|
|
||||||
'histogram=s@', 'binwidth=f', 'histstyle=s',
|
'histogram=s@', 'binwidth=f', 'histstyle=s',
|
||||||
'terminal=s',
|
'terminal=s',
|
||||||
'rangesize=s{2}', 'rangesizeall=i',
|
'rangesize=s{2}', 'rangesizeall=i', 'extraValuesPerPoint=i',
|
||||||
'tuplesize=s{2}', 'tuplesizeall=i',
|
|
||||||
'extraValuesPerPoint=i', # deprecated and undocumented
|
|
||||||
'help', 'dump', 'exit', 'version',
|
'help', 'dump', 'exit', 'version',
|
||||||
'geometry=s') or exit 1;
|
'geometry=s') or exit 1;
|
||||||
|
|
||||||
|
|
||||||
# handle various cmdline-option errors
|
# handle various cmdline-option errors
|
||||||
if ( $options{help} )
|
if ( $options{help} )
|
||||||
{
|
{
|
||||||
@@ -157,11 +160,6 @@ sub interpretCommandline
|
|||||||
delete $options{with};
|
delete $options{with};
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $options{dataid} && $options{vnlog} )
|
|
||||||
{
|
|
||||||
print STDERR "--dataid and --vnlog are mutually exclusive. Please just use one.\n";
|
|
||||||
exit -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# expand options that are given as comma-separated lists
|
# expand options that are given as comma-separated lists
|
||||||
for my $listkey (qw(histogram y2))
|
for my $listkey (qw(histogram y2))
|
||||||
@@ -169,7 +167,7 @@ sub interpretCommandline
|
|||||||
@{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
|
@{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
|
||||||
if defined $options{$listkey};
|
if defined $options{$listkey};
|
||||||
}
|
}
|
||||||
for my $listkey (qw(curvestyle rangesize tuplesize))
|
for my $listkey (qw(curvestyle rangesize))
|
||||||
{
|
{
|
||||||
next unless defined $options{$listkey};
|
next unless defined $options{$listkey};
|
||||||
my @in = @{$options{$listkey}};
|
my @in = @{$options{$listkey}};
|
||||||
@@ -189,35 +187,6 @@ sub interpretCommandline
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# convert all tuplesize business to rangesize
|
|
||||||
my $domainsize = $options{'3d'} ? 2 : 1;
|
|
||||||
if (defined $options{tuplesizeall})
|
|
||||||
{
|
|
||||||
if (defined $options{rangesizeall} )
|
|
||||||
{
|
|
||||||
print STDERR "Only one of --rangesizeall and --tuplesizeall may be given\n";
|
|
||||||
exit -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$options{rangesizeall} = $options{tuplesizeall} - $domainsize;
|
|
||||||
delete $options{tuplesizeall};
|
|
||||||
}
|
|
||||||
if (defined $options{tuplesize})
|
|
||||||
{
|
|
||||||
$options{rangesize} //= [];
|
|
||||||
|
|
||||||
my $N = @{$options{tuplesize}} / 2;
|
|
||||||
for my $i (0..$N-1)
|
|
||||||
{
|
|
||||||
$options{tuplesize}[2*$i + 1] -= $domainsize;
|
|
||||||
}
|
|
||||||
|
|
||||||
push @{$options{rangesize}}, @{$options{tuplesize}};
|
|
||||||
delete $options{tuplesize};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# If we're plotting histograms, then set the default histogram options for
|
# If we're plotting histograms, then set the default histogram options for
|
||||||
# each histogram curve
|
# each histogram curve
|
||||||
#
|
#
|
||||||
@@ -458,27 +427,6 @@ sub interpretCommandline
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# deal with --image. I just fill in --equation, and reverse the y extents if
|
|
||||||
# none are explicitly given
|
|
||||||
if( defined $options{image} )
|
|
||||||
{
|
|
||||||
# images generally have the origin at the top-left instead of the
|
|
||||||
# bottom-left, so given nothing else, I flip the y axis
|
|
||||||
if( !defined $options{ymin} && !defined $options{ymax} &&
|
|
||||||
! any { /^ *yrange\b/ } @{$options{set}} )
|
|
||||||
{
|
|
||||||
push @{$options{set}}, "yrange [:] reverse";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! -r $options{image} )
|
|
||||||
{
|
|
||||||
die "Couldn't read image '$options{image}'";
|
|
||||||
}
|
|
||||||
|
|
||||||
unshift @{$options{equation}}, qq{"$options{image}" binary filetype=auto flipy with rgbimage title "$options{image}"};
|
|
||||||
delete $options{image};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getGnuplotVersion
|
sub getGnuplotVersion
|
||||||
@@ -531,66 +479,16 @@ sub makeDomainNumeric
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
my $prev_timed_replot_time = [gettimeofday];
|
|
||||||
my $pipe_in;
|
|
||||||
my $selector;
|
|
||||||
my $line_number = 0;
|
|
||||||
my $is_stdin = !@ARGV; # read stdin only if no data files given on the cmdline
|
|
||||||
sub openNextFile
|
|
||||||
{
|
|
||||||
my $fd;
|
|
||||||
if($is_stdin)
|
|
||||||
{
|
|
||||||
$fd = IO::Handle->new();
|
|
||||||
$fd->fdopen(fileno(STDIN), "r") or die "Couldn't open STDIN";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
my $filename = shift @ARGV;
|
|
||||||
$fd = IO::File->new($filename, "r") or die "Couldn't open file '$filename'";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $selector = IO::Select->new( $fd );
|
|
||||||
return ($fd, $selector);
|
|
||||||
}
|
|
||||||
sub getNextLine
|
sub getNextLine
|
||||||
{
|
{
|
||||||
sub getline_internal
|
|
||||||
{
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
my $line = $pipe_in->getline();
|
|
||||||
if( !$is_stdin && !defined $line && $pipe_in->eof() && @ARGV)
|
|
||||||
{
|
|
||||||
# I got to the end of one file, so open the next one (which I'm
|
|
||||||
# sure exists)
|
|
||||||
($pipe_in, $selector) = openNextFile();
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
return $line;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( !defined $pipe_in )
|
|
||||||
{
|
|
||||||
($pipe_in, $selector) = openNextFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
$this_replot_is_from_timer = undef;
|
$this_replot_is_from_timer = undef;
|
||||||
|
|
||||||
# if we're not streaming, or we're doing triggered-only replotting, simply
|
# if we're not streaming, or we're doing triggered-only replotting, simply
|
||||||
# do a blocking read
|
# do a blocking read
|
||||||
if (! $options{stream} || $options{stream} < 0)
|
return $stdin->getline()
|
||||||
{
|
if (! $options{stream} || $options{stream} < 0);
|
||||||
$line_number++;
|
|
||||||
return getline_internal();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my $now = [gettimeofday];
|
my $now = [gettimeofday];
|
||||||
@@ -605,8 +503,7 @@ sub getNextLine
|
|||||||
|
|
||||||
if ($selector->can_read($time_remaining))
|
if ($selector->can_read($time_remaining))
|
||||||
{
|
{
|
||||||
$line_number++;
|
return $stdin->getline();
|
||||||
return getline_internal();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -757,6 +654,11 @@ sub mainThread
|
|||||||
print(PIPE "set xdata time\n");
|
print(PIPE "set xdata time\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# add the extra global options
|
||||||
|
print(PIPE "$_\n") foreach (@{$options{extracmds}});
|
||||||
|
print(PIPE "set $_\n") foreach (@{$options{set}});
|
||||||
|
print(PIPE "unset $_\n") foreach (@{$options{unset}});
|
||||||
|
|
||||||
# set up histograms
|
# set up histograms
|
||||||
$options{binwidth} ||= 1; # if no binwidth given, set it to 1
|
$options{binwidth} ||= 1; # if no binwidth given, set it to 1
|
||||||
print PIPE
|
print PIPE
|
||||||
@@ -779,11 +681,6 @@ sub mainThread
|
|||||||
sendRangeCommand( "zrange", $options{zmin}, $options{zmax} );
|
sendRangeCommand( "zrange", $options{zmin}, $options{zmax} );
|
||||||
sendRangeCommand( "cbrange", $options{zmin}, $options{zmax} ) if($options{colormap});
|
sendRangeCommand( "cbrange", $options{zmin}, $options{zmax} ) if($options{colormap});
|
||||||
|
|
||||||
# add the extra global options
|
|
||||||
print(PIPE "$_\n") foreach (@{$options{extracmds}});
|
|
||||||
print(PIPE "set $_\n") foreach (@{$options{set}});
|
|
||||||
print(PIPE "unset $_\n") foreach (@{$options{unset}});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -793,41 +690,6 @@ sub mainThread
|
|||||||
# The domain of the current point
|
# The domain of the current point
|
||||||
my @domain;
|
my @domain;
|
||||||
|
|
||||||
# column headers from vnlog
|
|
||||||
my @vnlog_headers;
|
|
||||||
if($options{vnlog})
|
|
||||||
{
|
|
||||||
require Vnlog::Parser;
|
|
||||||
require Vnlog::Util;
|
|
||||||
|
|
||||||
if ( !defined $pipe_in )
|
|
||||||
{
|
|
||||||
($pipe_in, $selector) = openNextFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
my $parser = Vnlog::Parser->new();
|
|
||||||
while (defined ($_ = Vnlog::Util::get_unbuffered_line($pipe_in)))
|
|
||||||
{
|
|
||||||
if ( !$parser->parse($_) )
|
|
||||||
{
|
|
||||||
die "Error parsing vnlog: $parser->{error}; looking at line '$_'";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $keys = $parser->getKeys();
|
|
||||||
if (defined $keys)
|
|
||||||
{
|
|
||||||
@vnlog_headers = @$keys;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!@vnlog_headers)
|
|
||||||
{
|
|
||||||
die "Looked through all of the first file, and never saw a vnlog legend";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# The x-axis domain represented as a number. This is exactly the same as
|
# The x-axis domain represented as a number. This is exactly the same as
|
||||||
# $domain[0] unless the x-axis domain uses a timefmt. Then this is the
|
# $domain[0] unless the x-axis domain uses a timefmt. Then this is the
|
||||||
# number of seconds since the UNIX epoch.
|
# number of seconds since the UNIX epoch.
|
||||||
@@ -911,33 +773,16 @@ sub mainThread
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$domain[0] = $line_number;
|
$domain[0] = $.;
|
||||||
$domain0_numeric = makeDomainNumeric( $domain[0] );
|
$domain0_numeric = makeDomainNumeric( $domain[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
my $id = -1;
|
my $id = -1;
|
||||||
my $i_curve = 0;
|
|
||||||
while(@fields)
|
while(@fields)
|
||||||
{
|
{
|
||||||
if ($options{dataid})
|
if($options{dataid}) { $id = shift @fields; }
|
||||||
{
|
else { $id++; }
|
||||||
$id = shift @fields;
|
|
||||||
}
|
|
||||||
elsif($options{vnlog} )
|
|
||||||
{
|
|
||||||
if( $icurve >= @vnlog_headers )
|
|
||||||
{
|
|
||||||
# Got more columns than vnlog headers. The data is probably
|
|
||||||
# bogus, but I don't want to barf at the user, so I silently
|
|
||||||
# ignore the data
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
$id = $vnlog_headers[$i_curve];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$id++;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $rangesize = getRangeSize($id);
|
my $rangesize = getRangeSize($id);
|
||||||
last if @fields < $rangesize;
|
last if @fields < $rangesize;
|
||||||
@@ -947,8 +792,6 @@ sub mainThread
|
|||||||
@domain,
|
@domain,
|
||||||
splice( @fields, 0, $rangesize ) ) . "\n",
|
splice( @fields, 0, $rangesize ) ) . "\n",
|
||||||
$domain0_numeric);
|
$domain0_numeric);
|
||||||
|
|
||||||
$i_curve++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1070,8 +913,7 @@ sub updateCurveOptions
|
|||||||
$usingoptions = "using 1:" . join(':', @rest);
|
$usingoptions = "using 1:" . join(':', @rest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions} $options{curvestyleall}";
|
||||||
$curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub getCurve
|
sub getCurve
|
||||||
@@ -1090,11 +932,7 @@ sub getCurve
|
|||||||
|
|
||||||
if( !exists $curveIndices{$id} )
|
if( !exists $curveIndices{$id} )
|
||||||
{
|
{
|
||||||
push @curves, {# if we have a catch-all style and no specific style, use
|
push @curves, {extraoptions => ' ',
|
||||||
# the catch-all style
|
|
||||||
extraoptions => (!exists $options{curvestyle_hash}{$id} &&
|
|
||||||
exists $options{curvestyleall}) ?
|
|
||||||
"$options{curvestyleall} " : ' ',
|
|
||||||
datastring => '',
|
datastring => '',
|
||||||
datastring_meta => [],
|
datastring_meta => [],
|
||||||
datastring_offset => 0}; # push a curve with no data and no options
|
datastring_offset => 0}; # push a curve with no data and no options
|
||||||
@@ -1244,9 +1082,6 @@ sub pushPoint
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mainThread();
|
|
||||||
|
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
feedgnuplot - General purpose pipe-oriented plotting tool
|
feedgnuplot - General purpose pipe-oriented plotting tool
|
||||||
@@ -1264,45 +1099,45 @@ Simple plotting of piped data:
|
|||||||
|
|
||||||
$ seq 5 | awk '{print 2*$1, $1*$1}' |
|
$ seq 5 | awk '{print 2*$1, $1*$1}' |
|
||||||
feedgnuplot --lines --points --legend 0 "data 0" --title "Test plot" --y2 1
|
feedgnuplot --lines --points --legend 0 "data 0" --title "Test plot" --y2 1
|
||||||
--unset grid --terminal 'dumb 80,40' --exit
|
--terminal 'dumb 80,40' --exit
|
||||||
|
|
||||||
Test plot
|
Test plot
|
||||||
|
|
||||||
10 +-----------------------------------------------------------------+ 25
|
10 ++------+--------+-------+-------+-------+--------+-------+------*A 25
|
||||||
| + + + + + + + *##|
|
+ + + + + + + + **#+
|
||||||
| data 0 ***A*#* |
|
| : : : : : : data 0+**A*** |
|
||||||
| ** # |
|
| : : : : : : :** # |
|
||||||
9 |-+ ** ## |
|
9 ++.......................................................**.##....|
|
||||||
| ** # |
|
| : : : : : : ** :# |
|
||||||
| ** # |
|
| : : : : : : ** # |
|
||||||
| ** ## +-| 20
|
| : : : : : :** ##: ++ 20
|
||||||
8 |-+ A # |
|
8 ++................................................A....#..........|
|
||||||
| ** # |
|
| : : : : : **: # : |
|
||||||
| ** ## |
|
| : : : : : ** : ## : |
|
||||||
| ** # |
|
| : : : : : ** :# : |
|
||||||
| ** B |
|
| : : : : :** B : |
|
||||||
7 |-+ ** ## |
|
7 ++......................................**......##................|
|
||||||
| ** ## +-| 15
|
| : : : : ** : ## : : ++ 15
|
||||||
| ** # |
|
| : : : : ** : # : : |
|
||||||
| ** ## |
|
| : : : :** : ## : : |
|
||||||
6 |-+ *A ## |
|
6 ++..............................*A.......##.......................|
|
||||||
| ** ## |
|
| : : : ** : ##: : : |
|
||||||
| ** # |
|
| : : : ** : # : : : |
|
||||||
| ** ## +-| 10
|
| : : :** : ## : : : ++ 10
|
||||||
5 |-+ ** ## |
|
5 ++......................**........##..............................|
|
||||||
| ** #B |
|
| : : ** : #B : : : |
|
||||||
| ** ## |
|
| : : ** : ## : : : : |
|
||||||
| ** ## |
|
| : :** : ## : : : : |
|
||||||
4 |-+ A ### |
|
4 ++...............A.......###......................................|
|
||||||
| ** ## |
|
| : **: ##: : : : : |
|
||||||
| ** ## +-| 5
|
| : ** : ## : : : : : ++ 5
|
||||||
| ** ## |
|
| : ** : ## : : : : : |
|
||||||
| ** ##B# |
|
| :** ##B# : : : : : |
|
||||||
3 |-+ ** #### |
|
3 ++.....**..####...................................................|
|
||||||
| **#### |
|
| **#### : : : : : : |
|
||||||
| #### |
|
| **## : : : : : : : |
|
||||||
|## + + + + + + + |
|
B** + + + + + + + +
|
||||||
2 +-----------------------------------------------------------------+ 0
|
2 A+------+--------+-------+-------+-------+--------+-------+------++ 0
|
||||||
1 1.5 2 2.5 3 3.5 4 4.5 5
|
1 1.5 2 2.5 3 3.5 4 4.5 5
|
||||||
|
|
||||||
|
|
||||||
@@ -1370,64 +1205,41 @@ with the I<X>-value at the start of that line.
|
|||||||
|
|
||||||
=head3 Curve indexing
|
=head3 Curve indexing
|
||||||
|
|
||||||
We index the curves in one of 3 ways: sequentially, explicitly with a
|
By default, each column represents a separate curve. This is fine unless sparse
|
||||||
C<--dataid> or by C<--vnlog> headers.
|
data is to be plotted. With the C<--dataid> option, each point is represented by
|
||||||
|
2 values: a string identifying the curve, and the value itself. If we add
|
||||||
By default, each column represents a separate curve. The first column (after any
|
C<--dataid> to the original example:
|
||||||
domain) is curve C<0>. The next one is curve C<1> and so on. This is fine unless
|
|
||||||
sparse data is to be plotted. With the C<--dataid> option, each point is
|
|
||||||
represented by 2 values: a string identifying the curve, and the value itself.
|
|
||||||
If we add C<--dataid> to the original example:
|
|
||||||
|
|
||||||
$ seq 5 | awk '{print 2*$1, $1*$1}' | feedgnuplot --dataid --autolegend
|
$ seq 5 | awk '{print 2*$1, $1*$1}' | feedgnuplot --dataid --autolegend
|
||||||
|
|
||||||
we get 5 different curves with one point in each. The first column, as produced
|
we get 5 different curves with one point in each. The first column, as produced
|
||||||
by C<awk>, is B<2,4,6,8,10>. These are interpreted as the IDs of the curves to
|
by C<awk>, is B<2,4,6,8,10>. These are interpreted as the IDs of the curves to
|
||||||
be plotted.
|
be plotted. The C<--autolegend> option adds a legend using the given IDs to
|
||||||
|
|
||||||
If we're plotting C<vnlog> data (L<https://www.github.com/dkogan/vnlog>) then we
|
|
||||||
can get the curve IDs from the vnlog header. Vnlog is a trivial data format
|
|
||||||
where lines starting with C<#> are comments and the first comment contains
|
|
||||||
column labels. If we have such data, C<feedgnuplot --vnlog> can interpret these
|
|
||||||
column labels if the C<vnlog> perl modules are available.
|
|
||||||
|
|
||||||
The C<--autolegend> option adds a legend using the given IDs to
|
|
||||||
label the curves. The IDs need not be numbers; generic strings are accepted. As
|
label the curves. The IDs need not be numbers; generic strings are accepted. As
|
||||||
many points as desired can appear on a single line. C<--domain> can be used in
|
many points as desired can appear on a single line. C<--domain> can be used in
|
||||||
conjunction with C<--dataid> or C<--vnlog>.
|
conjunction with C<--dataid>.
|
||||||
|
|
||||||
=head3 Multi-value style support
|
=head3 Multi-value style support
|
||||||
|
|
||||||
Depending on how gnuplot is plotting the data, more than one value may be needed
|
Depending on how gnuplot is plotting the data, more than one value may be needed
|
||||||
to represent the range of a single point. Basic 2D plots have 2 numbers
|
to represent the range of a single point. Basic 2D plots have 2 numbers
|
||||||
representing each point: 1 domain and 1 range. But if plotting with
|
representing each point: 1 domain and 1 range. But if plotting with
|
||||||
C<--circles>, for instance, then there's an extra range value: the radius. Many
|
C<--circles>, for instance, then there's an extra range value: the radius. A
|
||||||
other gnuplot styles require more data: errorbars, variable colors (C<with
|
similar situation exists with C<--colormap> where each point contains the
|
||||||
points palette>), variable sizes (C<with points ps variable>), labels and so on.
|
position I<and> the color. There are other gnuplot styles that require more data
|
||||||
The feedgnuplot tool itself does not know about all these intricacies, but they
|
(such as error bars), but none of these are directly supported by the script.
|
||||||
can still be used, by specifying the specific style with C<--style>, and
|
They can still be used, however, by specifying the specific style with
|
||||||
specifying how many values are needed for each point with any of
|
C<--style>, and specifying how many values are needed for each point with
|
||||||
C<--rangesizeall, C<--tuplesizeall>, C<--rangesize>, C<--tuplesize>. These
|
C<--rangesizeall> or C<--rangesize> or C<--extraValuesPerPoint>. Those options
|
||||||
options are required I<only> for styles not explicitly supported by feedgnuplot;
|
that specify the range size are required I<only> for styles not explicitly
|
||||||
supported styles do the right thing automatically.
|
supported by feedgnuplot; supported styles do the right thing automatically.
|
||||||
|
|
||||||
Specific example: if making a 2d plot of y error bars, the exact format can be
|
More examples: if making a 2d plot of y error bars where gnuplot expects a
|
||||||
queried by running C<gnuplot> and invoking C<help yerrorbars>. This tells us
|
(x,y,ydelta) tuple for each point, you want C<--rangesizeall 2> because you have
|
||||||
that there's a 3-column form: C<x y ydelta> and a 4-column form: C<x y ylow
|
one domain value (x) and 2 range values (y,ydelta). Gnuplot can also plot
|
||||||
yhigh>. With 2d plots feedgnuplot will always output the 1-value domain C<x>, so
|
lopsided y errorbars by giving a tuple (x,y,ylow,yhigh). This is similar as
|
||||||
the rangesize is 2 and 3 respectively. Thus the following are equivalent:
|
before, but you want C<--rangesizeall 3> instead.
|
||||||
|
|
||||||
$ echo '1 2 0.3
|
|
||||||
2 3 0.4
|
|
||||||
3 4 0.5' | feedgnuplot --domain --rangesizeall 2 --with 'yerrorbars'
|
|
||||||
|
|
||||||
$ echo '1 2 0.3
|
|
||||||
2 3 0.4
|
|
||||||
3 4 0.5' | feedgnuplot --domain --tuplesizeall 3 --with 'yerrorbars'
|
|
||||||
|
|
||||||
$ echo '1 2 1.7 2.3
|
|
||||||
2 3 2.6 3.4
|
|
||||||
3 4 3.5 4.5' | feedgnuplot --domain --rangesizeall 3 --with 'yerrorbars'
|
|
||||||
|
|
||||||
=head3 3D data
|
=head3 3D data
|
||||||
|
|
||||||
@@ -1661,19 +1473,6 @@ point in curve ID 20
|
|||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
C<--vnlog>
|
|
||||||
|
|
||||||
Vnlog is a trivial data format where lines starting with C<#> are comments and
|
|
||||||
the first comment contains column labels. Some tools for working with such data
|
|
||||||
are available from the C<vnlog> project: L<https://www.github.com/dkogan/vnlog>.
|
|
||||||
With the C<vnlog> perl modules installed, we can read the vnlog column headers
|
|
||||||
with C<feedgnuplot --vnlog>. This replaces C<--dataid>, and we can do all the
|
|
||||||
normal things with these headers. For instance C<feedgnuplot --vnlog
|
|
||||||
--autolegend> will generate plot legends for each column in the vnlog, using the
|
|
||||||
vnlog column label in the legend.
|
|
||||||
|
|
||||||
=item
|
|
||||||
|
|
||||||
C<--[no]3d>
|
C<--[no]3d>
|
||||||
|
|
||||||
Do [not] plot in 3D. This only makes sense with C<--domain>. Each domain here is
|
Do [not] plot in 3D. This only makes sense with C<--domain>. Each domain here is
|
||||||
@@ -1690,8 +1489,7 @@ Interpret the X data as a time/date, parsed with the given format
|
|||||||
C<--colormap>
|
C<--colormap>
|
||||||
|
|
||||||
Show a colormapped xy plot. Requires extra data for the color. zmin/zmax can be
|
Show a colormapped xy plot. Requires extra data for the color. zmin/zmax can be
|
||||||
used to set the extents of the colors. Automatically sets the
|
used to set the extents of the colors. Automatically sets the C<--rangesize>.
|
||||||
C<--rangesize>/C<--tuplesize>.
|
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
@@ -1719,8 +1517,7 @@ Do [not] draw points
|
|||||||
C<--circles>
|
C<--circles>
|
||||||
|
|
||||||
Plot with circles. This requires a radius be specified for each point.
|
Plot with circles. This requires a radius be specified for each point.
|
||||||
Automatically sets the C<--rangesize>/C<--tuplesize>. C<Not> supported for 3d
|
Automatically sets the C<--rangesize>. C<Not> supported for 3d plots.
|
||||||
plots.
|
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
@@ -1761,10 +1558,7 @@ C<--xmin/xmax/ymin/ymax/y2min/y2max/zmin/zmax xxx>
|
|||||||
|
|
||||||
Set the range for the given axis. These x-axis bounds are ignored in a streaming
|
Set the range for the given axis. These x-axis bounds are ignored in a streaming
|
||||||
plot. The y2-axis bound do not apply in 3d plots. The z-axis bounds apply
|
plot. The y2-axis bound do not apply in 3d plots. The z-axis bounds apply
|
||||||
I<only> to 3d plots or colormaps. Note that there is no C<--xrange> to set both
|
I<only> to 3d plots or colormaps.
|
||||||
sides at once or C<--xinv> to flip the axis around: anything more than the
|
|
||||||
basics supported in this option is clearly obtainable by talking to gnuplot, for
|
|
||||||
instance C<--set 'xrange [20:10]'> to set the given inverted bounds.
|
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
@@ -1889,26 +1683,15 @@ times.
|
|||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
C<--image filename>
|
|
||||||
|
|
||||||
Overlays the data on top of a raster image given in C<filename>. This is passed
|
|
||||||
through to gnuplot via C<--equation>, and is not interpreted by C<feedgnuplot>
|
|
||||||
other than checking for existence. Usually images have their origin at the
|
|
||||||
top-left corner, while plots have it in the bottom-left corner instead. Thus if
|
|
||||||
the y-axis extents are not specified (C<--ymin>, C<--ymax>, C<--set 'yrange
|
|
||||||
...'>) this option will also flip around the y axis to make the image appear
|
|
||||||
properly. Since this option is just a passthrough to gnuplot, finer control can
|
|
||||||
be achieved by passing in C<--equation> and C<--set yrange ...> directly.
|
|
||||||
|
|
||||||
C<--equation xxx>
|
C<--equation xxx>
|
||||||
|
|
||||||
Gnuplot can plot both data and symbolic equations. C<feedgnuplot> generally
|
Gnuplot can plot both data and symbolic equations. C<feedgnuplot> generally
|
||||||
plots data, but with this option can plot symbolic equations I<also>. This is
|
plots data, but with this option can plot symbolic equations I<also>. This is
|
||||||
generally intended to augment data plots, since for equation-only plots you
|
generally intended to augment data plots, since for equation-only plots you
|
||||||
don't need C<feedgnuplot>. C<--equation> can be passed multiple times for
|
don't need C<feedgnuplot>. C<--equation> can be passed multiple times for
|
||||||
multiple equations. The given strings are passed to gnuplot directly without
|
multiple equations. The given strings are passed to gnuplot directly without any
|
||||||
anything added or removed, so styling and such should be applied in the string.
|
thing added or removed, so styling and such should be applied in the string. A
|
||||||
A basic example:
|
basic example:
|
||||||
|
|
||||||
seq 100 | awk '{print $1/10, $1/100}' |
|
seq 100 | awk '{print $1/10, $1/100}' |
|
||||||
feedgnuplot --with 'lines lw 3' --domain --ymax 1
|
feedgnuplot --with 'lines lw 3' --domain --ymax 1
|
||||||
@@ -1958,7 +1741,7 @@ file type is desired, use both C<--hardcopy> and C<--terminal>
|
|||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
C<--maxcurves N>
|
C<--maxcurves xxx>
|
||||||
|
|
||||||
The maximum allowed number of curves. This is 100 by default, but can be reset
|
The maximum allowed number of curves. This is 100 by default, but can be reset
|
||||||
with this option. This exists purely to prevent perl from allocating all of the
|
with this option. This exists purely to prevent perl from allocating all of the
|
||||||
@@ -1968,22 +1751,20 @@ system's memory when reading bogus data
|
|||||||
|
|
||||||
C<--monotonic>
|
C<--monotonic>
|
||||||
|
|
||||||
If C<--domain> is given, checks to make sure that the x-coordinate in the input
|
If C<--domain> is given, checks to make sure that the x- coordinate in the input
|
||||||
data is monotonically increasing. If a given x-variable is in the past, all data
|
data is monotonically increasing. If a given x-variable is in the past, all data
|
||||||
currently cached for this curve is purged. Without C<--monotonic>, all data is
|
currently cached for this curve is purged. Without C<--monotonic>, all data is
|
||||||
kept. Does not make sense with 3d plots. No C<--monotonic> by default. The data
|
kept. Does not make sense with 3d plots. No C<--monotonic> by default. The data is
|
||||||
is replotted before being purged. This is useful in streaming plots where the
|
replotted before being purged
|
||||||
incoming data represents multiple iterations of the same process (repeated
|
|
||||||
simulations of the same period in time, for instance).
|
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
C<--rangesize curveID N>
|
C<--rangesize curveID xxx>
|
||||||
|
|
||||||
The options C<--rangesizeall> and C<--rangesize> set the number of values are
|
The options C<--rangesizeall>, C<--rangesize> and C<--extraValuesPerPoint> set
|
||||||
needed to represent each point being plotted (see L</"Multi-value style
|
the number of values are needed to represent each point being plotted (see
|
||||||
support"> above). These options are I<only> needed if unknown styles are used,
|
L</"Multi-value style support"> above). These options are I<only> needed if
|
||||||
with C<--styleall> or C<--with> for instance.
|
unknown styles are used, with C<--styleall> or C<--with> for instance.
|
||||||
|
|
||||||
C<--rangesize> is used to set how many values are needed to represent the range
|
C<--rangesize> is used to set how many values are needed to represent the range
|
||||||
of a point for a particular curve. This overrides any defaults that may exist
|
of a point for a particular curve. This overrides any defaults that may exist
|
||||||
@@ -1995,25 +1776,19 @@ rangesize should apply.
|
|||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
C<--tuplesize curveID N>
|
C<--rangesizeall xxx>
|
||||||
|
|
||||||
Very similar to C<--rangesize>, but instead of specifying the I<range> only,
|
|
||||||
this specifies the whole tuple. For instance if we're plotting circles, the
|
|
||||||
tuplesize is 3: C<x,y,radius>. In a 2D plot there's a 1-dimensional domain:
|
|
||||||
C<x>, so the rangesize is 2: C<y,radius>. This dimensionality can be given
|
|
||||||
either way.
|
|
||||||
|
|
||||||
=item
|
|
||||||
|
|
||||||
C<--rangesizeall N>
|
|
||||||
|
|
||||||
Like C<--rangesize>, but applies to I<all> the curves.
|
Like C<--rangesize>, but applies to I<all> the curves.
|
||||||
|
|
||||||
=item
|
C<--extraValuesPerPoint xxx>
|
||||||
|
|
||||||
C<--tuplesizeall N>
|
Like C<--rangesizeall>, but instead of overriding the default, adds to it. For
|
||||||
|
example, if plotting non-lopsided y errorbars gnuplot wants (x,y,ydelta) tuples.
|
||||||
|
These can be specified both with C<--rangesizeall 2> (because there are 2 range
|
||||||
|
values) or C<--extraValuesPerPoint 1> (because there's 1 more value than usual).
|
||||||
|
|
||||||
Like C<--tuplesize>, but applies to I<all> the curves.
|
This option is I<only> needed if unknown styles are used, with C<--styleall> or
|
||||||
|
C<--with> for instance.
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
@@ -2026,15 +1801,16 @@ is possible to send the output produced this way to gnuplot directly.
|
|||||||
|
|
||||||
C<--exit>
|
C<--exit>
|
||||||
|
|
||||||
This controls what happens when the input data is exhausted, or when some part
|
This controls the details of what happens when the input data is exhausted, or
|
||||||
of the C<feedgnuplot> pipeline is killed. This option does different things
|
when some part of the C<feedgnuplot> pipeline is killed. This option does
|
||||||
depending on whether C<--stream> is active, so read this closely.
|
different things depending on whether C<--stream> is active, so read this
|
||||||
|
closely.
|
||||||
|
|
||||||
With interactive gnuplot terminals (qt, x11, wxt), the plot windows live in a
|
With interactive gnuplot terminals (qt, x11, wxt), the plot windows live in a
|
||||||
separate process from the main C<gnuplot> process. It is thus possible for the
|
separate process from the main C<gnuplot> process. It is thus possible for the
|
||||||
main C<gnuplot> process to exit, while leaving the plot windows up (a caveat is
|
main C<gnuplot> process to exit, while leaving the plot windows up (a caveat is
|
||||||
that such decapitated windows aren't interactive). There are 3 possible states
|
that such decapitated windows aren't interactive). To be clear, there are 3
|
||||||
of the polotting pipeline:
|
possible states:
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
@@ -2049,35 +1825,35 @@ prompt available
|
|||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
The possibilities are:
|
The C<--exit> option controls the details of this behavior. The possibilities
|
||||||
|
are:
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item No C<--stream>, all data read in
|
=item No C<--stream>, input pipe is exhausted (all data read in)
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item no C<--exit> (default)
|
=item default; no C<--exit>
|
||||||
|
|
||||||
Alive. Need to Ctrl-C to get back into the shell
|
Alive. Need to Ctrl-C to get back into the shell
|
||||||
|
|
||||||
=item C<--exit>
|
=item C<--exit>
|
||||||
|
|
||||||
Half-alive. Non-interactive prompt up, and the shell accepts new commands.
|
Half-alive. Non-interactive prompt up, and the shell accepts new commands.
|
||||||
Without C<--stream> the goal is to show a plot, so a Dead state would not be
|
Without C<--stream> the goal is to show a plot, so a Dead state is not useful
|
||||||
useful.
|
here.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=item C<--stream>, all data read in or the C<feedgnuplot> process terminated
|
=item C<--stream>, input pipe is exhausted (all data read in) or the
|
||||||
|
C<feedgnuplot> process terminated
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
=item no C<--exit> (default)
|
=item default; no C<--exit>
|
||||||
|
|
||||||
Alive. Need to Ctrl-C to get back into the shell. This means that when making
|
Alive. Need to Ctrl-C to get back into the shell
|
||||||
live plots, the first Ctrl-C kills the data feeding process, but leaves the
|
|
||||||
final plot up for inspection. A second Ctrl-C kills feedgnuplot as well.
|
|
||||||
|
|
||||||
=item C<--exit>
|
=item C<--exit>
|
||||||
|
|
||||||
@@ -2172,21 +1948,11 @@ in a Thinkpad.
|
|||||||
|
|
||||||
=head2 Plotting points on top of an existing image
|
=head2 Plotting points on top of an existing image
|
||||||
|
|
||||||
This can be done with C<--image>:
|
This can be done by using C<--equation> to pass arbitrary plot input to gnuplot:
|
||||||
|
|
||||||
$ < features_xy.data
|
|
||||||
feedgnuplot --points --domain --image "image.png"
|
|
||||||
|
|
||||||
or with C<--equation>:
|
|
||||||
|
|
||||||
$ < features_xy.data
|
$ < features_xy.data
|
||||||
feedgnuplot --points --domain
|
feedgnuplot --points --domain
|
||||||
--equation '"image.png" binary filetype=auto flipy with rgbimage'
|
--equation '"image.png" binary filetype=png flipy with rgbimage'
|
||||||
--set 'yrange [:] reverse'
|
|
||||||
|
|
||||||
The C<--image> invocation is a convenience wrapper for the C<--equation>
|
|
||||||
version. Finer control is available with C<--equation>.
|
|
||||||
|
|
||||||
|
|
||||||
Here an existing image is given to gnuplot verbatim, and data to plot on top of
|
Here an existing image is given to gnuplot verbatim, and data to plot on top of
|
||||||
it is interpreted by feedgnuplot as usual. C<flipy> is useful here because
|
it is interpreted by feedgnuplot as usual. C<flipy> is useful here because
|
||||||
|
@@ -21,7 +21,6 @@ complete -W \
|
|||||||
--set \
|
--set \
|
||||||
--unset \
|
--unset \
|
||||||
--equation \
|
--equation \
|
||||||
--image \
|
|
||||||
--geometry \
|
--geometry \
|
||||||
--hardcopy \
|
--hardcopy \
|
||||||
--help \
|
--help \
|
||||||
|
@@ -33,10 +33,9 @@ _arguments -S
|
|||||||
'*--set[Additional 'set' gnuplot commands]:set-option' \
|
'*--set[Additional 'set' gnuplot commands]:set-option' \
|
||||||
'*--unset[Additional 'unset' gnuplot commands]:unset-option' \
|
'*--unset[Additional 'unset' gnuplot commands]:unset-option' \
|
||||||
'*--equation[Raw symbolic equation]:equation' \
|
'*--equation[Raw symbolic equation]:equation' \
|
||||||
'--image[Image file to render beneath the data]:image:_files -g "(#i)*.(jpg|jpeg|png|gif)"' \
|
|
||||||
'--square[Plot data with square aspect ratio]' \
|
'--square[Plot data with square aspect ratio]' \
|
||||||
'--square_xy[For 3D plots, set square aspect ratio for ONLY the x,y axes]' \
|
'--square_xy[For 3D plots, set square aspect ratio for ONLY the x,y axes]' \
|
||||||
'--hardcopy[Plot to a file]:new image filename:_files -g "(#i)*.(jpg|jpeg|png|gif)"' \
|
'--hardcopy[Plot to a file]:filename' \
|
||||||
'--maxcurves[The maximum allowed number of curves]:number of curves' \
|
'--maxcurves[The maximum allowed number of curves]:number of curves' \
|
||||||
'(--3d)--monotonic[Resets plot if an X in the past is seen]' \
|
'(--3d)--monotonic[Resets plot if an X in the past is seen]' \
|
||||||
'(--rangesizeall)--extraValuesPerPoint[How many extra values are given for each data range]:N'\
|
'(--rangesizeall)--extraValuesPerPoint[How many extra values are given for each data range]:N'\
|
||||||
|
132
debian/changelog
vendored
Normal file
132
debian/changelog
vendored
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
feedgnuplot (1.41-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update:
|
||||||
|
- Histograms: --xlen can coexist with --xmin/--xmax
|
||||||
|
- Histograms: work as expected with --xlen and --monotonic
|
||||||
|
- Histograms: better sanity checking of options
|
||||||
|
|
||||||
|
-- Dima Kogan <dkogan@debian.org> Fri, 24 Feb 2017 23:53:27 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.40-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update:
|
||||||
|
- If the options couldn't be parsed I don't dump the whole manpage
|
||||||
|
- --style and --rangesize can now take a comma-separated list of IDs
|
||||||
|
- 'any' is from List::MoreUtils, not List::Util
|
||||||
|
- the sleep-forever delay at end is now > 1000 days
|
||||||
|
|
||||||
|
-- Dima Kogan <dkogan@debian.org> Fri, 25 Nov 2016 14:49:36 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.39-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update:
|
||||||
|
- by default, histograms are plotted in expected ways
|
||||||
|
- No enhanced text mode in hardcopies, slightly larger font size
|
||||||
|
|
||||||
|
-- Dima Kogan <dkogan@debian.org> Sat, 15 Oct 2016 20:45:15 -0700
|
||||||
|
|
||||||
|
feedgnuplot (1.37-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update: At the end of a streaming plot, include the last
|
||||||
|
chunk of data
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Fri, 01 Jan 2016 08:14:23 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.36-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update: added --equation to plot symbolic equations
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Fri, 13 Nov 2015 11:14:30 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.35-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Upstream update: fancier handling of termination conditions, no more
|
||||||
|
threading code
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Mon, 02 Nov 2015 13:55:32 -0800
|
||||||
|
|
||||||
|
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
|
||||||
|
plots
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Thu, 06 Feb 2014 23:19:02 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.32-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Added --rangesize and --rangesizeall. Different curves can now plot
|
||||||
|
different-size tuples
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Wed, 05 Feb 2014 14:00:44 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.30-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* made the VCS links canonical
|
||||||
|
* added --set, --unset, --with, --style, --styleall
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Fri, 24 Jan 2014 15:50:03 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.28-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Upstream update:
|
||||||
|
- Removed example debianization
|
||||||
|
- Removed unreliable unit tests from automated testing (Closes: #731080)
|
||||||
|
* gnuplot dependency now favors graphical gnuplot packages
|
||||||
|
* Removed Anton Gladky from the Uploaders
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Wed, 04 Dec 2013 02:05:08 -0800
|
||||||
|
|
||||||
|
feedgnuplot (1.26-1) unstable; urgency=low
|
||||||
|
|
||||||
|
[ Dima Kogan ]
|
||||||
|
* Minor POD update
|
||||||
|
* 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)
|
||||||
|
|
||||||
|
[ Anton Gladky ]
|
||||||
|
* Add libipc-run-perl to Build-Depends to execute tests
|
||||||
|
|
||||||
|
-- Dima Kogan <dima@secretsauce.net> Sun, 20 Oct 2013 01:19:51 -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
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
9
|
21
debian/control
vendored
Normal file
21
debian/control
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Source: feedgnuplot
|
||||||
|
Section: science
|
||||||
|
Priority: optional
|
||||||
|
Build-Depends: debhelper (>= 9), libstring-shellquote-perl, perl, gawk, gnuplot, libipc-run-perl
|
||||||
|
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
|
||||||
|
Uploaders: Dima Kogan <dima@secretsauce.net>
|
||||||
|
Standards-Version: 3.9.4
|
||||||
|
Homepage: https://github.com/dkogan/feedgnuplot
|
||||||
|
Vcs-Git: git://anonscm.debian.org/debian-science/packages/feedgnuplot.git
|
||||||
|
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/feedgnuplot.git
|
||||||
|
|
||||||
|
Package: feedgnuplot
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}, ${perl:Depends},
|
||||||
|
liblist-moreutils-perl,
|
||||||
|
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
|
||||||
|
data representations are supported, as is hardcopy output and streaming display
|
||||||
|
of live data.
|
24
debian/copyright
vendored
Normal file
24
debian/copyright
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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'.
|
9
debian/feedgnuplot.doc-base
vendored
Normal file
9
debian/feedgnuplot.doc-base
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
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
|
1
debian/feedgnuplot.docs
vendored
Normal file
1
debian/feedgnuplot.docs
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
feedgnuplot.html
|
2
debian/feedgnuplot.install
vendored
Normal file
2
debian/feedgnuplot.install
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
completions/bash/feedgnuplot /etc/bash_completion.d/
|
||||||
|
completions/zsh/_feedgnuplot /usr/share/zsh/vendor-completions
|
4
debian/gbp.conf
vendored
Normal file
4
debian/gbp.conf
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
debian-branch = debian
|
||||||
|
upstream-tag = v%(version)s
|
||||||
|
pristine-tar = True
|
12
debian/rules
vendored
Executable file
12
debian/rules
vendored
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/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
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
3.0 (quilt)
|
4
debian/watch
vendored
Normal file
4
debian/watch
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
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
|
Reference in New Issue
Block a user