Compare commits

...

52 Commits

Author SHA1 Message Date
Dima Kogan
0c209a8a2a changelog bump 2020-04-17 14:21:17 -07:00
Dima Kogan
04f966ea17 Merge branch 'master' into debian 2020-04-17 14:19:49 -07:00
Dima Kogan
bdb9919c39 documented --every 2020-04-17 14:18:09 -07:00
Dima Kogan
4e85f991c4 version bump 2020-04-17 14:07:08 -07:00
Dima Kogan
2e6c9d6ea3 added tab completions for --every and --everyall 2020-04-17 14:06:10 -07:00
Dima Kogan
c4eef7a167 --timefmt can be used with --histogram 2020-04-17 14:01:17 -07:00
Dima Kogan
7e1e6af184 Removed reference to no-longer-existing variable 2020-03-06 22:16:07 -08:00
Dima Kogan
e9c9ff02e4 Minor no-op refactoring 2020-03-06 22:16:07 -08:00
Dima Kogan
2f9a6acdb3 Minor no-op refactoring
The ID->curve hash %curveIndices is now called $curveFromID, and now gives you a
curve reference, not an index to @curves

I can thus reorder @curves as I like, and %curveFromID remains valid
2020-03-06 22:14:40 -08:00
Dima Kogan
5e0869dc25 Added support for --every and --everyall
Needs documentation, tab completion
2020-01-24 19:24:02 -08:00
Dima Kogan
592ce20d1f readme update
github had a bug where it wouldn't render symlinks to embedded POD. Is this
still broken?
2020-01-08 21:20:50 -08:00
Dima Kogan
bad9ac9732 version bump 2020-01-08 18:59:42 -08:00
Dima Kogan
3c14e4e106 Merge branch 'master' into debian 2020-01-08 18:57:53 -08:00
Dima Kogan
373b97092e version bump 2020-01-08 18:55:52 -08:00
Dima Kogan
e4523f97e7 documentation 2019-12-16 20:37:36 -08:00
Dima Kogan
d73118087a Full support for all 4 2d axes
Before I'd default to x1y1, and I could use x1y2 if --y2. Now I can ask for
--x1y2 and --x2y1 and --x2y2
2019-11-13 13:50:07 -08:00
Dima Kogan
b8111af563 added forgotten options to the tab-completions 2019-09-11 14:57:40 -07:00
Dima Kogan
fb76985239 Use Dima's @debian.org email address for Uploaders 2019-08-25 15:45:28 -07:00
Dima Kogan
2b7dd9dbc8 changelog bump 2019-08-25 15:36:10 -07:00
Dima Kogan
a022064a5c Merge tag 'v1.52' into debian 2019-08-25 15:34:04 -07:00
Dima Kogan
54fc8c625d version bump 2019-08-25 15:32:55 -07:00
Dima Kogan
8bb0c3a7d8 Manual POD update
Maybe github fixed their bug already? I should check
2019-08-25 15:32:08 -07:00
Dima Kogan
dda83b2c27 Revert "added note to INSTALL file"
This reverts commit 87a4069a5a.

This should go into the master branch, not the debian branch
2019-08-25 15:25:29 -07:00
Dima Kogan
3a28d5fed9 Added Suggests:vnlog 2019-08-25 15:22:34 -07:00
Dima Kogan
29f4f5a368 Added --squarexy and --square-xy as synonyms to --square_xy 2019-06-27 11:11:20 -07:00
Dima Kogan
55faefec8b README has link to SCaLE talk 2019-03-10 18:09:47 -07:00
Dima Kogan
77f54da873 extracted POD into README.pod. manually 2019-01-14 18:22:25 -08:00
Dima Kogan
b5275d6386 manually extracted README.pod to a file to work around github bug 2019-01-14 18:18:19 -08:00
Dima Kogan
481f18a5fb added note to INSTALL file 2018-11-29 17:17:14 -08:00
Dima Kogan
87a4069a5a added note to INSTALL file 2018-11-29 17:16:47 -08:00
Jelmer Vernooij
dac7e2a2d4 Trim trailing whitespace.
Fixes lintian: file-contains-trailing-whitespace
See https://lintian.debian.org/tags/file-contains-trailing-whitespace.html for more details.
2018-10-20 20:50:27 +00:00
Jelmer Vernooij
3ac5b1b9f3 Use secure copyright file specification URI.
Fixes lintian: insecure-copyright-format-uri
See https://lintian.debian.org/tags/insecure-copyright-format-uri.html for more details.
2018-10-20 20:50:27 +00:00
Dima Kogan
5772f8894f changelog bump 2018-09-29 11:00:57 -07:00
Dima Kogan
958c6364c3 Merge tag 'v1.51' into debian 2018-09-29 11:00:01 -07:00
Dima Kogan
40fea5eb7f changelog bump 2018-09-29 10:57:37 -07:00
Dima Kogan
016c7ebfa9 Added a new .gp terminal to create self-plotting gnuplot scripts 2018-09-29 10:55:36 -07:00
Dima Kogan
744239b7b7 version bump 2018-08-24 13:16:40 -07:00
Dima Kogan
0c06f72d5d Merge branch 'master' into debian 2018-08-24 13:15:05 -07:00
Dima Kogan
350b2db022 version bump 2018-08-24 13:13:45 -07:00
Dima Kogan
ba0f2eee08 completion knows about the fnormal distribution 2018-08-24 13:13:45 -07:00
Dima Kogan
778825bd34 completion knows about the fnormal distribution 2018-08-24 13:11:57 -07:00
Dima Kogan
9237811ed0 Script waits for the plot window to close before exiting
Instead of sleeping forever. This is really nice! I no longer need to quit the
plot window AND then C-c. Quitting the plot window is now sufficient
2018-08-23 22:31:14 -07:00
Dima Kogan
69285d7df1 fixed typo in docs 2018-07-09 18:38:56 -07:00
Dima Kogan
e514b24e39 changelog update 2018-06-17 22:18:41 -07:00
Dima Kogan
88eeff7890 updated URLs to point to salsa 2018-04-19 08:12:29 -07:00
Dima Kogan
aedbc28afe by default --image sets range noextend
This is usually what I want
2018-04-10 00:51:30 -07:00
Dima Kogan
e167e057d3 changelog bump 2018-03-16 13:56:32 -07:00
Dima Kogan
38e92c5ba9 Merge branch 'master' into debian 2018-03-16 13:55:16 -07:00
Dima Kogan
e865871492 changelog bump 2018-03-16 13:53:57 -07:00
Dima Kogan
0f85110a38 --vnl now works with plots that have rangesize > 1 2018-03-16 13:50:49 -07:00
Dima Kogan
811d0d45ab new bash-completion install dir 2018-03-11 18:32:31 -07:00
Dima Kogan
5cf4acca62 zsh completion: --xlen argument isn't optional 2018-03-02 18:02:10 -08:00
10 changed files with 1397 additions and 119 deletions

43
Changes
View File

@@ -1,3 +1,46 @@
feedgnuplot (1.54)
* Added --every and --everyall to decimate the input data
* --timefmt can be used with --histogram
-- Dima Kogan <dkogan@debian.org> Fri, 17 Apr 2020 14:06:55 -0700
feedgnuplot (1.53)
* Full support for all 4 axes. Added --x2...
-- Dima Kogan <dkogan@debian.org> Wed, 08 Jan 2020 18:55:29 -0800
feedgnuplot (1.52)
* Added --squarexy and --square-xy as synonyms to --square_xy
-- Dima Kogan <dima@secretsauce.net> Sun, 25 Aug 2019 15:32:37 -0700
feedgnuplot (1.51)
* Added .gp "terminal" to create self-plotting gnuplot files
-- Dima Kogan <dima@secretsauce.net> Sat, 29 Sep 2018 10:56:30 -0700
feedgnuplot (1.50)
* Script waits for the plot window to close before exiting
Instead of sleeping forever. This is really nice! I no longer need
to quit the plot window AND then C-c. Quitting the plot window is
now sufficient
* by default --image sets range noextend
* tab-completion knows about the fnormal distribution
-- Dima Kogan <dkogan@debian.org> Fri, 24 Aug 2018 13:11:05 -0700
feedgnuplot (1.49)
* --vnl now works with plots that have rangesize > 1
* zsh completion: --xlen argument isn't optional
-- Dima Kogan <dima@secretsauce.net> Fri, 16 Mar 2018 13:52:28 -0700
feedgnuplot (1.48)
* --vnlog works properly with --domain

View File

@@ -10,4 +10,11 @@ Without a package, an installation can be done with
make
make install
This installs feedgnuplot to /usr/local. Adjust the paths as required
This installs feedgnuplot to /usr/local. Adjust the paths as required.
Also, note that this is a self-contained utility. Usually running from the tree
works just fine:
git clone https://github.com/dkogan/feedgnuplot.git
cd feedgnuplot/bin
./feedgnuplot ...

View File

@@ -1 +0,0 @@
bin/feedgnuplot

1009
README.pod Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@ use Pod::Usage;
use Time::Piece;
# Makefile.PL assumes this is in ''
my $VERSION = '1.48';
my $VERSION = '1.54';
my %options;
interpretCommandline();
@@ -31,8 +31,8 @@ interpretCommandline();
# datastring
my @curves = ();
# list mapping curve names to their indices in the @curves list
my %curveIndices = ();
# Maps a curve ID to the corresponding curve
my %curveFromID = ();
# Whether any new data has arrived since the last replot
my $haveNewData;
@@ -90,8 +90,11 @@ sub interpretCommandline
$options{legend} = [];
$options{curvestyle} = [];
$options{style} = [];
$options{every} = [];
$options{histogram} = [];
$options{y2} = [];
$options{x1y2} = [];
$options{x2y1} = [];
$options{x2y2} = [];
$options{extracmds} = [];
$options{set} = [];
$options{unset} = [];
@@ -105,11 +108,15 @@ sub interpretCommandline
$options{tuplesize} = [];
GetOptions(\%options, 'stream:s', 'domain!', 'dataid!', 'vnlog!', '3d!', 'colormap!', 'lines!', 'points!',
'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',
'zmin=f', 'zmax=f', 'y2=s@',
'circles', 'legend=s{2}', 'autolegend!', 'xlabel=s', 'x2label=s', 'ylabel=s', 'y2label=s', 'zlabel=s',
'title=s', 'xlen=f',
'xmin=s', 'xmax=s', 'x2min=s', 'x2max=s',
'ymin=f', 'ymax=f', 'y2min=f', 'y2max=f',
'zmin=f', 'zmax=f',
'x2=s@', 'y2=s@', 'x1y2=s@', 'x2y1=s@', 'x2y2=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',
'every=s{2}', 'everyall=s',
'square!', 'square_xy!', 'square-xy!', 'squarexy!', 'hardcopy=s', 'maxcurves=i', 'monotonic!', 'timefmt=s',
'equation=s@',
'image=s',
'histogram=s@', 'binwidth=f', 'histstyle=s',
@@ -143,6 +150,10 @@ sub interpretCommandline
delete $options{styleall};
}
# various square-xy synonyms
$options{'square_xy'} = 1 if $options{'square-xy'} || $options{'squarexy'};
push @{$options{curvestyle}}, @{$options{style}};
delete $options{style};
@@ -164,12 +175,12 @@ sub interpretCommandline
}
# expand options that are given as comma-separated lists
for my $listkey (qw(histogram y2))
for my $listkey (qw(histogram x2 y2 x1y2 x2y1 x2y2))
{
@{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
if defined $options{$listkey};
}
for my $listkey (qw(curvestyle rangesize tuplesize))
for my $listkey (qw(curvestyle rangesize tuplesize every))
{
next unless defined $options{$listkey};
my @in = @{$options{$listkey}};
@@ -188,6 +199,11 @@ sub interpretCommandline
@{$options{$listkey}} = @out;
}
# handle x2 == x2y1 and y2 == x1y2
push @{$options{x2y1}}, @{$options{x2}} if defined $options{x2};
push @{$options{x1y2}}, @{$options{y2}} if defined $options{y2};
$options{x2} = [];
$options{y2} = [];
# convert all tuplesize business to rangesize
my $domainsize = $options{'3d'} ? 2 : 1;
@@ -239,7 +255,7 @@ sub interpretCommandline
# arrays in order to preserve the ordering. I parse both of these into hashes
# because those are useful to have later. After this I can access individual
# legends with $options{legend_hash}{curveid}
for my $listkey (qw(legend curvestyle rangesize))
for my $listkey (qw(legend curvestyle rangesize every))
{
$options{"${listkey}_hash"} = {};
@@ -347,9 +363,11 @@ sub interpretCommandline
exit -1;
}
if ( defined $options{y2min} || defined $options{y2max} || @{$options{y2}} )
if ( defined $options{x2min} || defined $options{x2max} ||
defined $options{y2min} || defined $options{y2max} ||
@{$options{x1y2}} || @{$options{x2y1}} || @{$options{x2y2}} )
{
print STDERR "--3d does not make sense with --y2...\n";
print STDERR "--3d does not make sense with --x2... or --y2...\n";
exit -1;
}
@@ -379,9 +397,9 @@ sub interpretCommandline
}
else
{
if ( $options{timefmt} && !$options{domain} )
if ( $options{timefmt} && !$options{domain} && !@{$options{histogram}} )
{
print STDERR "--timefmt makes sense only with --domain\n";
print STDERR "--timefmt makes sense only with --domain or --histogram\n";
exit -1;
}
@@ -465,10 +483,13 @@ sub interpretCommandline
{
# 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} &&
if( !defined $options{xmin} && !defined $options{xmax} &&
!defined $options{ymin} && !defined $options{ymax} &&
! any { /^ *xrange\b/ } @{$options{set}} &&
! any { /^ *yrange\b/ } @{$options{set}} )
{
push @{$options{set}}, "yrange [:] reverse";
push @{$options{set}}, "xrange [:] noextend";
push @{$options{set}}, "yrange [:] reverse noextend";
}
if ( ! -r $options{image} )
@@ -614,14 +635,95 @@ sub getNextLine
sub mainThread
{
local *PIPE;
my $outputfile;
my $outputfileType;
if( defined $options{hardcopy})
{
$outputfile = $options{hardcopy};
if( $outputfile =~ /^[^|] # starts with anything other than |
.* # stuff in the middle
\.(eps|ps|pdf|png|svg|gp)$/ix) # ends with a known extension
{
$outputfileType = lc $1;
}
my %terminalOpts =
( eps => 'postscript noenhanced solid color enhanced eps',
ps => 'postscript noenhanced solid color landscape 12',
pdf => 'pdfcairo noenhanced solid color font ",12" size 11in,8.5in',
png => 'png noenhanced size 1280,1024',
svg => 'svg noenhanced',
gp => 'gp');
if( !defined $options{terminal} &&
defined $outputfileType &&
$terminalOpts{$outputfileType} )
{
$options{terminal} = $terminalOpts{$outputfileType};
}
die "Asked to plot to file '$outputfile', but I don't know which terminal to use, and no --terminal given"
unless $options{terminal};
}
sub gpterminal
{
return defined $options{terminal} && $options{terminal} eq 'gp';
}
sub datadump_only
{
return
exists $options{dump} ||
gpterminal();
}
sub search_PATH
{
for my $pathdir (File::Spec->path())
{
my $gnuplot_execpath = File::Spec->catfile($pathdir, $_[0]);
return $gnuplot_execpath
if -x $gnuplot_execpath && ! -d $gnuplot_execpath;
}
return undef;
}
if(datadump_only())
{
if(gpterminal())
{
open PIPE, '>', $outputfile;
my $gnuplotpath = search_PATH('gnuplot');
if(!defined $gnuplotpath)
{
print STDERR "Couldn't find the gnuplot executable path. Creating .gp file still, but omitting #!. This will NOT be self-executable";
}
else
{
chmod 0755, $outputfile;
print PIPE "#!$gnuplotpath\n";
}
}
else
{
*PIPE = *STDOUT;
}
}
else
{
my $dopersist = '';
if ( getGnuplotVersion() >= 4.3 && # --persist not available before this
# --persist is needed for the "half-alive" state (see documentation for
# --exit). This state is only used with these options:
!$options{stream} && $options{exit})
{
!$options{stream} && $options{exit}) {
$dopersist = '--persist';
}
@@ -636,52 +738,17 @@ sub mainThread
};
}
if(exists $options{dump})
{
*PIPE = *STDOUT;
}
else
{
my $geometry = defined $options{geometry} ?
"-geometry $options{geometry}" : '';
open PIPE, "|gnuplot $geometry $dopersist" or die "Can't initialize gnuplot\n";
}
autoflush PIPE 1;
my $outputfile;
my $outputfileType;
if( defined $options{hardcopy})
{
$outputfile = $options{hardcopy};
if( $outputfile =~ /^[^|] # starts with anything other than |
.* # stuff in the middle
\.(eps|ps|pdf|png|svg)$/ix) # ends with a known extension
{
$outputfileType = lc $1;
}
my %terminalOpts =
( eps => 'postscript noenhanced solid color enhanced eps',
ps => 'postscript noenhanced solid color landscape 12',
pdf => 'pdfcairo noenhanced solid color font ",12" size 11in,8.5in',
png => 'png noenhanced size 1280,1024',
svg => 'svg noenhanced');
if( !defined $options{terminal} &&
defined $outputfileType &&
$terminalOpts{$outputfileType} )
if(!gpterminal())
{
$options{terminal} = $terminalOpts{$outputfileType};
}
die "Asked to plot to file '$outputfile', but I don't know which terminal to use, and no --terminal given"
unless $options{terminal};
}
print PIPE "set terminal $options{terminal}\n" if $options{terminal};
print PIPE "set output \"$outputfile\"\n" if $outputfile;
}
# set up plotting style
my $style = '';
@@ -696,9 +763,10 @@ sub mainThread
print PIPE "set grid\n";
print(PIPE "set xlabel \"$options{xlabel }\"\n") if defined $options{xlabel};
print(PIPE "set x2label \"$options{x2label}\"\n") if defined $options{x2label};
print(PIPE "set ylabel \"$options{ylabel }\"\n") if defined $options{ylabel};
print(PIPE "set zlabel \"$options{zlabel }\"\n") if defined $options{zlabel};
print(PIPE "set y2label \"$options{y2label}\"\n") if defined $options{y2label};
print(PIPE "set zlabel \"$options{zlabel }\"\n") if defined $options{zlabel};
print(PIPE "set title \"$options{title }\"\n") if defined $options{title};
if($options{square})
@@ -746,9 +814,21 @@ sub mainThread
$options{curvestyle}[$idx*2 + 1]);
}
}
if(@{$options{every}})
{
# @{$options{every}} is a list where consecutive pairs are (curveID,
# every).
my $n = scalar @{$options{every}}/2;
foreach my $idx (0..$n-1)
{
addEveryOption($options{every}[$idx*2 ],
$options{every}[$idx*2 + 1]);
}
}
# For the values requested to be printed on the y2 axis, set that
addCurveOption($_, 'axes x1y2') foreach (@{$options{y2}});
addCurveOption($_, 'axes x1y2') foreach (@{$options{x1y2}});
addCurveOption($_, 'axes x2y1') foreach (@{$options{x2y1}});
addCurveOption($_, 'axes x2y2') foreach (@{$options{x2y2}});
# timefmt
if( $options{timefmt} )
@@ -765,7 +845,14 @@ sub mainThread
setCurveAsHistogram( $_ ) foreach (@{$options{histogram}});
if(@{$options{y2}})
if(@{$options{x2y1}} || @{$options{x2y2}})
{
print PIPE "set xtics nomirror\n";
print PIPE "set x2tics\n";
# if any of the ranges are given, set the range
sendRangeCommand( "x2range", $options{x2min}, $options{x2max} );
}
if(@{$options{x1y2}} || @{$options{x2y2}})
{
print PIPE "set ytics nomirror\n";
print PIPE "set y2tics\n";
@@ -916,7 +1003,7 @@ sub mainThread
else
{
$domain[0] = $line_number;
$domain0_numeric = makeDomainNumeric( $domain[0] );
$domain0_numeric = $line_number;
}
my $id = -1;
@@ -951,14 +1038,14 @@ sub mainThread
splice( @fields, 0, $rangesize ) ) . "\n",
$domain0_numeric);
$i_column++;
$i_column += $rangesize;
}
}
# finished reading in all. Plot what we have
plotStoredData() unless $options{stream} && $options{exit};
if ( defined $options{hardcopy})
if ( defined $options{hardcopy} && !gpterminal())
{
print PIPE "set output\n";
@@ -987,7 +1074,15 @@ sub mainThread
# we persist gnuplot, so we shouldn't need this sleep. However, once
# gnuplot exits, but the persistent window sticks around, you can no
# longer interactively zoom the plot. So we still sleep
sleep(100000000) unless $options{dump} || $options{exit};
if(gpterminal())
{
print PIPE "pause mouse close\n";
close PIPE;
}
elsif(!($options{dump} || $options{exit}))
{
print PIPE "pause mouse close\n";
}
}
sub pruneOldData
@@ -1061,7 +1156,7 @@ sub updateCurveOptions
my $histoptions = $curve->{histoptions} || '';
my $usingoptions = '';
if( $options{timefmt} )
if( $options{timefmt} && !$histoptions )
{
# with --timefmt I need an explicit 'using' specification. I specify the
# columns as 1:2:3..... I need the right number of columns (this is given
@@ -1074,7 +1169,7 @@ sub updateCurveOptions
}
$curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions}";
$curve->{options} = "$curve->{everyoptions} $histoptions $usingoptions $titleoption $curve->{extraoptions}";
}
sub getCurve
@@ -1091,19 +1186,20 @@ sub getCurve
my ($id) = @_;
if( !exists $curveIndices{$id} )
if( !exists $curveFromID{$id} )
{
push @curves, {# if we have a catch-all style and no specific style, use
# the catch-all style
extraoptions => (!exists $options{curvestyle_hash}{$id} &&
exists $options{curvestyleall}) ?
my $curve = {extraoptions => ( exists $options{curvestyleall}) ?
"$options{curvestyleall} " : ' ',
everyoptions => (!exists $options{every_hash}{$id} &&
exists $options{everyall}) ?
"every $options{everyall} " : ' ',
datastring => '',
datastring_meta => [],
datastring_offset => 0}; # push a curve with no data and no options
$curveIndices{$id} = $#curves;
push @curves, $curve; # push a curve with no data and no options
$curveFromID{$id} = $curve;
updateCurveOptions($curves[$#curves], $id);
updateCurveOptions($curve, $id);
# --xlen has a meaning if we're not plotting histograms at all or if we're
@@ -1120,8 +1216,11 @@ sub getCurve
print STDERR "--xlen only makes sense when plotting ONLY histograms or ONLY NON-histograms\n";
exit -1;
}
return $curve;
}
return $curves[$curveIndices{$id}];
return $curveFromID{$id};
}
sub addCurveOption
@@ -1132,6 +1231,14 @@ sub addCurveOption
$curve->{extraoptions} .= "$str ";
updateCurveOptions($curve, $id);
}
sub addEveryOption
{
my ($id, $str) = @_;
my $curve = getCurve($id);
$curve->{everyoptions} .= "every $str ";
updateCurveOptions($curve, $id);
}
sub setCurveLabel
{
@@ -1308,6 +1415,7 @@ Simple plotting of piped data:
2 +-----------------------------------------------------------------+ 0
1 1.5 2 2.5 3 3.5 4 4.5 5
Here we asked for ASCII plotting, which is useful for documentation.
Simple real-time plotting example: plot how much data is received on the wlan0
network interface in bytes/second (uses bash, awk and Linux):
@@ -1410,7 +1518,7 @@ points palette>), variable sizes (C<with points ps variable>), labels and so on.
The feedgnuplot tool itself does not know about all these intricacies, but they
can still be used, by specifying the specific style with C<--style>, and
specifying how many values are needed for each point with any of
C<--rangesizeall, C<--tuplesizeall>, C<--rangesize>, C<--tuplesize>. These
C<--rangesizeall>, C<--tuplesizeall>, C<--rangesize>, C<--tuplesize>. These
options are required I<only> for styles not explicitly supported by feedgnuplot;
supported styles do the right thing automatically.
@@ -1534,15 +1642,20 @@ This command causes feedgnuplot to exit.
The script is able to produce hardcopy output with C<--hardcopy outputfile>. The
output type can be inferred from the filename, if B<.ps>, B<.eps>, B<.pdf>,
B<.svg> or B<.png> is requested. If any other file type is requested,
B<.svg>, B<.png> or B<.gp> is requested. If any other file type is requested,
C<--terminal> I<must> be passed in to tell gnuplot how to make the plot. If
C<--terminal> is passed in, then the C<--hardcopy> argument only provides the
output filename.
The B<.gp> output is special. Instead of asking gnuplot to plot to a particular
terminal, writing to a B<.gp> simply dumps a self-executable gnuplot script into
the given file. This is similar to what C<--dump> does, but writes to a file,
and makes sure that the file can be self-executing.
=head2 Self-plotting data files
This script can be used to enable self-plotting data files. There are 2 ways of
doing this: with a shebang (#!) or with inline perl data.
This script can be used to enable self-plotting data files. There are several
ways of doing this: with a shebang (#!) or with inline perl data.
=head3 Self-plotting data with a #!
@@ -1576,6 +1689,11 @@ characters and that the full path to feedgnuplot must be given. The 127
character limit is a serious limitation, but this can likely be resolved with a
kernel patch. I have only tried on Linux 2.6.
=head3 Self-plotting data with gnuplot
Running C<feedgnuplot --hardcopy plotdata.gp ....> will create a self-executable
gnuplot script in C<plotdata.gp>
=head3 Self-plotting data with perl inline data
Perl supports storing data and code in the same file. This can also be used to
@@ -1760,10 +1878,10 @@ plot I<only> histograms or I<only> I<non>-histograms.
=item
C<--xmin/xmax/ymin/ymax/y2min/y2max/zmin/zmax xxx>
C<--xmin/xmax/x2min/x2max/ymin/ymax/y2min/y2max/zmin/zmax xxx>
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 x2/y2-axis bounds 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
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
@@ -1771,23 +1889,29 @@ instance C<--set 'xrange [20:10]'> to set the given inverted bounds.
=item
C<--xlabel/ylabel/y2label/zlabel xxx>
C<--xlabel/x2label/ylabel/y2label/zlabel xxx>
Label the given axis. The y2-axis label does not apply to 3d plots while the
Label the given axis. The x2/y2-axis labels do not apply to 3d plots while the
z-axis label applies I<only> to 3d plots.
=item
C<--y2 xxx>
C<--x2/--y2/--x1y2/--x2y1/--x2y2 xxx>
Plot the data specified by this curve ID on the y2 axis. Without C<--dataid>,
the ID is just an ordered 0-based index. Does not apply to 3d plots. Can be
passed multiple times, or passed a comma-separated list. By default the y2-axis
curves look the same as the y-axis ones. I.e. the viewer of the resulting plot
has to be told which is which via an axes label, legend, etc. Prior to version
1.25 of feedgnuplot the curves plotted on the y2 axis were drawn with a thicker
line. This is no longer the case, but that behavior can be brought back by
passing something like
By default data is plotted against the x1 and y1 axes (the left and bottom one
respectively). If we want a particular curve plotted against a different axis,
we can specify that with these options. You pass C<--AXIS ID> where C<AXIS>
defines the axis (C<x2> or C<y2> or C<x1y2> or C<x2y1> or C<x2y2>) and the C<ID>
is the curve ID. C<--x2> is a synonym for C<--x2y1> and C<--y2> is a synonym for
C<--x1y2>. The curve ID is an ordered 0-based index or a specific ID if
C<--dataid> or C<--vnlog>. None of these apply to 3d plots. Can be passed
multiple times for different curve IDs, multiple IDs can be passed in as a
comma-separated list. By default the curves plotted against the various axes
aren not drawn in any differentiated way: the viewer of the resulting plot has
to be told which is which via an axes label, legend, colors, etc. Prior to
version 1.25 of C<feedgnuplot> the curves plotted on the y2 axis were drawn with
a thicker line. This is no longer the case, but that behavior can be brought
back by passing something like
--y2 curveid --style curveid 'linewidth 3'
@@ -1870,6 +1994,21 @@ Exclusive with C<--styleall>.
=item
C<--every curveID factor>
Decimates the input. Instead of plotting every point in the given curve, plot
one point per factor. This is useful to quickly process huge datasets. For
instance, to plot 1% of the data, pass a factor of 100.
=item
C<--everyallID factor>
Decimates the input. This works exactly like C<--every>, except it applies to
I<all> the curves.
=item
C<--extracmds xxx>
Additional commands to pass on to gnuplot verbatim. These could contain extra
@@ -1938,7 +2077,7 @@ all 3 axes
=item
C<--square_xy>
C<--square-xy>
For 3D plots, set square aspect ratio for ONLY the x,y axes

View File

@@ -9,6 +9,8 @@ complete -W \
--curvestyleall \
--style \
--styleall \
--every \
--everyall \
--with \
--dataid \
--domain \
@@ -17,6 +19,8 @@ complete -W \
--extraValuesPerPoint \
--rangesizeall \
--rangesize \
--tuplesizeall \
--tuplesize \
--extracmds \
--set \
--unset \
@@ -33,23 +37,31 @@ complete -W \
--monotonic \
--points \
--square \
--square_xy \
--square-xy \
--stream \
--terminal \
--timefmt \
--title \
--version \
--x2 \
--y2 \
--x2y1 \
--x1y2 \
--x2y2 \
--xlabel \
--xlen \
--xmax \
--xmin \
--y2 \
--y2label \
--y2max \
--y2min \
--x2label \
--x2max \
--x2min \
--ylabel \
--ymax \
--ymin \
--y2label \
--y2max \
--y2min \
--zlabel \
--zmax \
--zmin' feedgnuplot
--zmin \
--vnlog ' feedgnuplot

View File

@@ -10,22 +10,28 @@ _arguments -S
'--points' \
'--circles' \
'--xlabel:X-axis label:' \
'--x2label:X2-axis label:' \
'--ylabel:Y-axis label:' \
'--y2label:Y2-axis label:' \
'--zlabel:Z-axis label:' \
'--zlabel:Z-axis label:' \
'--title:Plot title:' \
'--autolegend[Label each plot with its data ID]' \
'(--3d)--xlen[the size of the x-window to plot]::window size:' \
'(--3d)--xlen[the size of the x-window to plot]:window size:' \
'(--xlen)--xmin:min X:' \
'(--xlen)--xmax:max X:' \
'--x2min:min X2:' \
'--x2max:max X2:' \
'--ymin:min Y:' \
'--ymax:max Y:' \
'--y2min:min Y2:' \
'--y2max:max Y2:' \
'--zmin:min Z:' \
'--zmax:max Z:' \
'*--y2:plot to place on the Y2 axis:' \
'*--x2:curve to place on the X2Y1 axis:' \
'*--y2:curve to place on the X1Y2 axis:' \
'*--x2y1:curve to place on the X2Y1 axis:' \
'*--x1y2:curve to place on the X1Y2 axis:' \
'*--x2y2:curve to place on the X2Y2 axis:' \
'(--with)--curvestyleall[Additional styles for ALL curves]:style' \
'(--with)--styleall[Additional styles for ALL curves]:style' \
'(--curvestyleall)--with[Additional styles for ALL curves]:style' \
@@ -35,23 +41,28 @@ _arguments -S
'*--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_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)"' \
'--maxcurves[The maximum allowed number of curves]:number of curves' \
'(--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'\
'(--extraValuesPerPoint)--rangesizeall[How many values are given for each data range]:N'\
'*--rangesize[How many values comprise a data range in this curve]:curve id: :N:' \
'(--extraValuesPerPoint)--tuplesizeall[How many values are given for each data tuple]:N'\
'*--tuplesize[How many values comprise a data tuple in this curve]:curve id: :N:' \
'--dump[Instead of printing to gnuplot, print to STDOUT]' \
'--geometry[The X11 geometry string]:geometry string:' \
'*--curvestyle[Additional styles for a curve]:curve id: :style:' \
'*--style[Additional styles for a curve]:curve id: :style:' \
'*--every[Decimation factor for a curve]:curve id: :decimation factor:' \
'--everyall[Decimation factor for ALL curves]:decimation factor' \
'(--3d)*--histogram:plot to treat as a histogram:' \
'--binwidth:Histogram bin width:' \
'--histstyle:Style of histogram:(frequency unique cumulative cnormal)' \
'--histstyle:Style of histogram:(frequency fnormal unique cumulative cnormal)' \
'--terminal:Terminal options to set with "set terminal":' \
'*--legend[Legend for a curve]:curve id: :legend:' \
'--exit[Exit gnuplot after making the plot]' \
'--version' \
'--help' \
'--timefmt[Format for time/date data]:time format'
'--timefmt[Format for time/date data]:time format' \
'--vnlog[column IDs come from a vnlog header]'

57
debian/changelog vendored
View File

@@ -1,3 +1,60 @@
feedgnuplot (1.54-1) unstable; urgency=medium
* New upstream release
- Added --every and --everyall to decimate the input data
- --timefmt can be used with --histogram
-- Dima Kogan <dkogan@debian.org> Fri, 17 Apr 2020 14:21:07 -0700
feedgnuplot (1.53-1) unstable; urgency=medium
* New upstream release
- Full support for all 4 axes. Added --x2...
-- Dima Kogan <dkogan@debian.org> Wed, 08 Jan 2020 18:59:29 -0800
feedgnuplot (1.52-1) unstable; urgency=medium
[ Jelmer Vernooij ]
* Use secure copyright file specification URI.
* Trim trailing whitespace.
[ Dima Kogan ]
* New upstream release
- --square-xy and --squarexy as synonyms for --square_xy
-- Dima Kogan <dkogan@debian.org> Sun, 25 Aug 2019 15:34:56 -0700
feedgnuplot (1.51-1) unstable; urgency=medium
* Added .gp "terminal" to create self-plotting gnuplot files
-- Dima Kogan <dkogan@debian.org> Sat, 29 Sep 2018 11:00:40 -0700
feedgnuplot (1.50-1) unstable; urgency=medium
* Script waits for the plot window to close before exiting
Instead of sleeping forever. This is really nice! I no longer need
to quit the plot window AND then C-c. Quitting the plot window is
now sufficient
* by default --image sets range noextend
* tab-completion knows about the fnormal distribution
-- Dima Kogan <dkogan@debian.org> Fri, 24 Aug 2018 13:16:35 -0700
feedgnuplot (1.49-2) unstable; urgency=medium
* Updated Vcs-... tags to salsa
-- Dima Kogan <dkogan@debian.org> Sun, 17 Jun 2018 22:18:18 -0700
feedgnuplot (1.49-1) unstable; urgency=medium
* --vnl now works with plots that have rangesize > 1
* zsh completion: --xlen argument isn't optional
-- Dima Kogan <dkogan@debian.org> Fri, 16 Mar 2018 13:56:27 -0700
feedgnuplot (1.48-1) unstable; urgency=medium
* Added --tuplesize and --tuplesizeall

7
debian/control vendored
View File

@@ -3,17 +3,18 @@ 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>
Uploaders: Dima Kogan <dkogan@debian.org>
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
Vcs-Browser: https://salsa.debian.org/science-team/feedgnuplot
Vcs-Git: https://salsa.debian.org/science-team/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
Suggests: vnlog
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

2
debian/copyright vendored
View File

@@ -1,4 +1,4 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://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

View File

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