From 2ecdfb9aefd2a00c04fd0144df876714741d3605 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 13 Nov 2015 11:19:25 -0800 Subject: [PATCH 1/6] minor POD fix --- bin/feedgnuplot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 7ceb3ca..cba4b36 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -1617,7 +1617,7 @@ times. C<--equation xxx> Gnuplot can plot both data and symbolic equations. C generally -plots data, but with this option can plot symbolic equations /also/. This is +plots data, but with this option can plot symbolic equations I. This is generally intended to augment data plots, since for equation-only plots you don't need C. C<--equation> can be passed multiple times for multiple equations. The given strings are passed to gnuplot directly without any @@ -1629,7 +1629,7 @@ basic example: --equation 'sin(x)/x' --equation 'cos(x)/x with lines lw 4' Here I plot the incoming data (points along a line) with the given style (a line -with thickness 3), /and/ I plot two damped sinusoids on the same plot. The +with thickness 3), I I plot two damped sinusoids on the same plot. The sinusoids are not affected by C styling, so their styles are set separately, as in this example. More complicated example: @@ -1638,7 +1638,7 @@ separately, as in this example. More complicated example: --set parametric --set "trange [0:2*3.14]" --equation "sin(t),cos(t)" Here the data I generate is points along the unit circle. I plot these as -points, and I /also/ plot a true circle as a parametric equation. +points, and I I plot a true circle as a parametric equation. =item From 960c43e758902388e927b5b94f1577de8d3510ad Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 13 Nov 2015 11:23:15 -0800 Subject: [PATCH 2/6] added --equation to the completions --- completions/bash/feedgnuplot | 1 + completions/zsh/_feedgnuplot | 1 + 2 files changed, 2 insertions(+) diff --git a/completions/bash/feedgnuplot b/completions/bash/feedgnuplot index 0bf6219..81460b1 100644 --- a/completions/bash/feedgnuplot +++ b/completions/bash/feedgnuplot @@ -20,6 +20,7 @@ complete -W \ --extracmds \ --set \ --unset \ + --equation \ --geometry \ --hardcopy \ --help \ diff --git a/completions/zsh/_feedgnuplot b/completions/zsh/_feedgnuplot index c2e710a..f29c20f 100644 --- a/completions/zsh/_feedgnuplot +++ b/completions/zsh/_feedgnuplot @@ -32,6 +32,7 @@ _arguments -S '*--extracmds[Additional gnuplot commands]:command' \ '*--set[Additional 'set' gnuplot commands]:set-option' \ '*--unset[Additional 'unset' gnuplot commands]:unset-option' \ + '*--equation[Raw symbolic equation]:equation' \ '--square[Plot data with square aspect ratio]' \ '--square_xy[For 3D plots, set square aspect ratio for ONLY the x,y axes]' \ '--hardcopy[Plot to a file]:filename' \ From 80b5d0ab614e48f602037df065ed3d39c704a880 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 13 Dec 2015 23:09:35 -0800 Subject: [PATCH 3/6] improved documentation of --histstyle --- bin/feedgnuplot | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index cba4b36..961db25 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -1541,12 +1541,17 @@ in the plot. Defaults to 1.0 if not given. C<--histstyle style> -Normally, histograms are generated with the 'smooth freq' gnuplot style. -C<--histstyle> can be used to select different 'smooth' settings. Allowed are -'unique', 'cumulative' and 'cnormal'. 'unique' indicates whether a bin has at -least one item in it: instead of counting the items, it'll always report 0 or 1. -'cumulative' is the integral of the "normal" histogram. 'cnormal' is like -'cumulative', but rescaled to end up at 1.0. +Normally, histograms are generated with the 'smooth frequency' gnuplot style. +C<--histstyle> can be used to select different C settings (see the +gnuplot C page for more info). Allowed values are 'frequency' (the +default), 'unique', 'cumulative' and 'cnormal'. 'unique' indicates whether a bin +has at least one item in it: instead of counting the items, it'll always report +0 or 1. 'cumulative' is the integral of the 'frequency' histogram. 'cnormal' is +like 'cumulative', but rescaled to end up at 1.0. Note that there's no +normalized 'frequency' option because gnuplot does not provide one. + + +C =item From 12eb829f165154fc6a22b796eaa3aad28826e4d8 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 15 Dec 2015 13:08:26 -0800 Subject: [PATCH 4/6] whitespace --- bin/feedgnuplot | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 961db25..6455070 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -552,7 +552,7 @@ sub mainThread print(PIPE "set view equal xy\n"); } -# For the specified values, set the legend entries to 'title "blah blah"' + # For the specified values, set the legend entries to 'title "blah blah"' if(@{$options{legend}}) { # @{$options{legend}} is a list where consecutive pairs are (curveID, @@ -567,7 +567,7 @@ sub mainThread } } -# add the extra curve options + # add the extra curve options if(@{$options{curvestyle}}) { # @{$options{curvestyle}} is a list where consecutive pairs are (curveID, @@ -582,22 +582,22 @@ sub mainThread } } -# For the values requested to be printed on the y2 axis, set that + # For the values requested to be printed on the y2 axis, set that addCurveOption($_, 'axes x1y2') foreach (@{$options{y2}}); -# timefmt + # timefmt if( $options{timefmt} ) { print(PIPE "set timefmt '$options{timefmt}'\n"); print(PIPE "set xdata time\n"); } -# add the extra global options + # 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 print PIPE "set boxwidth $options{binwidth}\n" . @@ -605,7 +605,7 @@ sub mainThread setCurveAsHistogram( $_ ) foreach (@{$options{histogram}}); -# set all the axis ranges + # set all the axis ranges # If a bound isn't given I want to set it to the empty string, so I can communicate it simply to # gnuplot print PIPE "set xtics\n"; From 232b68b81985856a5ee62681c5853c123f637c03 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 1 Jan 2016 08:08:51 -0800 Subject: [PATCH 5/6] At the end of a streaming plot, include the last chunk of data --- bin/feedgnuplot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 6455070..b68edf3 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -749,7 +749,7 @@ sub mainThread } # finished reading in all. Plot what we have - plotStoredData() unless $options{stream}; + plotStoredData() unless $options{stream} && $options{exit}; if ( defined $options{hardcopy}) { From 80b60309962a843d4a4a37f45ccd745fc40b576a Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 1 Jan 2016 08:11:45 -0800 Subject: [PATCH 6/6] version bump --- Changes | 7 +++++++ bin/feedgnuplot | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 79bc584..34cb996 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,10 @@ +feedgnuplot (1.37) + + * At the end of a streaming plot, include the last chunk of data + * Added --equation to the completions + + -- Dima Kogan Fri, 01 Jan 2016 08:09:43 -0800 + feedgnuplot (1.36) * Added --equation to plot symbolic equations diff --git a/bin/feedgnuplot b/bin/feedgnuplot index b68edf3..9789769 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -14,7 +14,7 @@ use Text::ParseWords; # for shellwords use Pod::Usage; use Time::Piece; -my $VERSION = 1.36; +my $VERSION = 1.37; my %options; interpretCommandline();