From 1c853a2193bfc6781fd2e41b28c32157052d7a5c Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 27 Jun 2017 18:27:26 -0700 Subject: [PATCH 1/8] zsh now completes filenames --- completions/zsh/_feedgnuplot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/zsh/_feedgnuplot b/completions/zsh/_feedgnuplot index 8826e94..49d5e22 100644 --- a/completions/zsh/_feedgnuplot +++ b/completions/zsh/_feedgnuplot @@ -33,10 +33,10 @@ _arguments -S '*--set[Additional 'set' gnuplot commands]:set-option' \ '*--unset[Additional 'unset' gnuplot commands]:unset-option' \ '*--equation[Raw symbolic equation]:equation' \ - '--image[Image file to render beneath the data]:image' \ + '--image[Image file to render beneath the data]:image filename:_files' \ '--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' \ + '--hardcopy[Plot to a file]:plot output filename:_files' \ '--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'\ From 6f091d1cf2ed569b6acca5c1d15b460579378269 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 30 Sep 2017 11:02:18 -0700 Subject: [PATCH 2/8] The version is now treated as a string not as a number Before this a version 1.40 was seen as 1.4 --- Makefile.PL | 4 ++-- bin/feedgnuplot | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index a02c839..6863f49 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -20,9 +20,9 @@ sub parseversion while() { - if( /VERSION = ([0-9\.]+)/ ) + if( /VERSION = '([0-9\.]+)'/ ) { - if ( $1 != $version ) + if ( $1 ne $version ) { die "Version mismatch. Changes says version is '$version', but 'bin/feedgnuplot' says it is '$1'"; } diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 7eda297..3cb66cb 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -15,7 +15,8 @@ use Text::ParseWords; # for shellwords use Pod::Usage; use Time::Piece; -my $VERSION = 1.44; +# Makefile.PL assumes this is in '' +my $VERSION = '1.44'; my %options; interpretCommandline(); From 575886524691b7f64f2e53948b8345b505bb35c0 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 30 Sep 2017 19:16:54 -0700 Subject: [PATCH 3/8] custom settings are now set AFTER all our internal ones Thus the custom settings take precedence --- bin/feedgnuplot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 3cb66cb..2d17876 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -720,11 +720,6 @@ sub mainThread 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 $options{binwidth} ||= 1; # if no binwidth given, set it to 1 print PIPE @@ -747,6 +742,11 @@ sub mainThread sendRangeCommand( "zrange", $options{zmin}, $options{zmax} ); 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}}); + From fec440c8b3ba6405d2a21f3f39991bc23fa33c84 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 30 Sep 2017 22:53:43 -0700 Subject: [PATCH 4/8] --curvestyle now overrides --curvestyleall This is how it was supposed to work, but apparently it didn't work this way: --curvestyleall options were active for ALL the curves --- bin/feedgnuplot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 2d17876..18fb7ca 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -979,7 +979,8 @@ sub updateCurveOptions $usingoptions = "using 1:" . join(':', @rest); } - $curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions} $options{curvestyleall}"; + + $curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions}"; } sub getCurve @@ -998,7 +999,11 @@ sub getCurve if( !exists $curveIndices{$id} ) { - push @curves, {extraoptions => ' ', + 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}) ? + "$options{curvestyleall} " : ' ', datastring => '', datastring_meta => [], datastring_offset => 0}; # push a curve with no data and no options From b59137c255dbebfd41f34366410d342f08d391aa Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 30 Sep 2017 23:16:41 -0700 Subject: [PATCH 5/8] zsh completions: --image suggests files, --hardcopy does NOT suggest files --image reads existing files, so it should ask for existing files --hardcopy creates new files, so it shouldn't suggest existing files --- completions/zsh/_feedgnuplot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/zsh/_feedgnuplot b/completions/zsh/_feedgnuplot index 49d5e22..1575c2d 100644 --- a/completions/zsh/_feedgnuplot +++ b/completions/zsh/_feedgnuplot @@ -33,10 +33,10 @@ _arguments -S '*--set[Additional 'set' gnuplot commands]:set-option' \ '*--unset[Additional 'unset' gnuplot commands]:unset-option' \ '*--equation[Raw symbolic equation]:equation' \ - '--image[Image file to render beneath the data]:image filename:_files' \ + '--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]' \ - '--hardcopy[Plot to a file]:plot output filename:_files' \ + '--hardcopy[Plot to a file]:new filename' \ '--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'\ From 7b3040ecc9435d7d6c7d1950d9d818500fc27755 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Wed, 11 Oct 2017 18:32:15 -0700 Subject: [PATCH 6/8] --image now produces a nicer legend: just the filename --- bin/feedgnuplot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 18fb7ca..0f39948 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -439,7 +439,7 @@ sub interpretCommandline die "Couldn't read image '$options{image}'"; } - unshift @{$options{equation}}, qq{"$options{image}" binary filetype=auto flipy with rgbimage}; + unshift @{$options{equation}}, qq{"$options{image}" binary filetype=auto flipy with rgbimage title "$options{image}"}; delete $options{image}; } } From 07a109b09ad2b819075137483d48d3b5023b79a7 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Wed, 11 Oct 2017 18:42:17 -0700 Subject: [PATCH 7/8] zsh completion: --hardcopy suggests filenames too Generally --hardcopy should produce new files, but the completion is still useful. --- completions/zsh/_feedgnuplot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/zsh/_feedgnuplot b/completions/zsh/_feedgnuplot index 1575c2d..5cdddda 100644 --- a/completions/zsh/_feedgnuplot +++ b/completions/zsh/_feedgnuplot @@ -36,7 +36,7 @@ _arguments -S '--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]' \ - '--hardcopy[Plot to a file]:new filename' \ + '--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'\ From 9cc67cdaebb61782325149180553915a206381a6 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 29 Oct 2017 14:02:20 -0700 Subject: [PATCH 8/8] new release --- Changes | 15 +++++++++++++-- bin/feedgnuplot | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 8605a73..ad0a948 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,14 @@ +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 Sun, 29 Oct 2017 13:56:28 -0700 + feedgnuplot (1.44) * --image draws its output beneath everything else @@ -43,8 +54,8 @@ feedgnuplot (1.39) feedgnuplot (1.38) * hardcopy defaults: - - no enhanced text mode - - larger font size + - no enhanced text mode + - larger font size -- Dima Kogan Wed, 27 Jul 2016 22:15:11 -0700 diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 0f39948..85baefe 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -16,7 +16,7 @@ use Pod::Usage; use Time::Piece; # Makefile.PL assumes this is in '' -my $VERSION = '1.44'; +my $VERSION = '1.45'; my %options; interpretCommandline();