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/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..85baefe 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.45'; my %options; interpretCommandline(); @@ -438,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}; } } @@ -719,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 @@ -746,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}}); + @@ -978,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 @@ -997,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 diff --git a/completions/zsh/_feedgnuplot b/completions/zsh/_feedgnuplot index 8826e94..5cdddda 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:_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]: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'\