From 3bf2fa43efc7d9ec3c9ea21724e812b2c2fb6592 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 22 Dec 2017 23:30:25 -0800 Subject: [PATCH 01/12] Un-documented --extraValuesPerPoint This is awkward and I want to get rid of it. It still works, but there's no more documentation for it --- bin/feedgnuplot | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 85baefe..8b07751 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -113,7 +113,8 @@ sub interpretCommandline 'image=s', 'histogram=s@', 'binwidth=f', 'histstyle=s', 'terminal=s', - 'rangesize=s{2}', 'rangesizeall=i', 'extraValuesPerPoint=i', + 'rangesize=s{2}', 'rangesizeall=i', + 'extraValuesPerPoint=i', # deprecated and undocumented 'help', 'dump', 'exit', 'version', 'geometry=s') or exit 1; @@ -1846,10 +1847,10 @@ replotted before being purged C<--rangesize curveID xxx> -The options C<--rangesizeall>, C<--rangesize> and C<--extraValuesPerPoint> set -the number of values are needed to represent each point being plotted (see -L above). These options are I needed if -unknown styles are used, with C<--styleall> or C<--with> for instance. +The options C<--rangesizeall> and C<--rangesize> set the number of values are +needed to represent each point being plotted (see L above). These options are I needed if 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 of a point for a particular curve. This overrides any defaults that may exist @@ -1865,16 +1866,6 @@ C<--rangesizeall xxx> Like C<--rangesize>, but applies to I the curves. -C<--extraValuesPerPoint xxx> - -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). - -This option is I needed if unknown styles are used, with C<--styleall> or -C<--with> for instance. - =item C<--dump> From 2aa51d2a6063af12d652dbfcbb7a31412bead792 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 22 Dec 2017 23:56:07 -0800 Subject: [PATCH 02/12] Added --tuplesize and --tuplesizeall These are just convenience options that are VERY similar to --rangesize and --rangesizeall. But adding these makes this tool nicely similar to gnuplotlib --- bin/feedgnuplot | 100 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 20 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 8b07751..b2a7b21 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -102,6 +102,7 @@ sub interpretCommandline $options{with} = ''; $options{rangesize} = []; + $options{tuplesize} = []; GetOptions(\%options, 'stream:s', 'domain!', 'dataid!', '3d!', 'colormap!', 'lines!', 'points!', 'circles', 'legend=s{2}', 'autolegend!', 'xlabel=s', 'ylabel=s', 'y2label=s', 'zlabel=s', @@ -114,6 +115,7 @@ sub interpretCommandline 'histogram=s@', 'binwidth=f', 'histstyle=s', 'terminal=s', 'rangesize=s{2}', 'rangesizeall=i', + 'tuplesize=s{2}', 'tuplesizeall=i', 'extraValuesPerPoint=i', # deprecated and undocumented 'help', 'dump', 'exit', 'version', 'geometry=s') or exit 1; @@ -162,7 +164,7 @@ sub interpretCommandline @{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}} if defined $options{$listkey}; } - for my $listkey (qw(curvestyle rangesize)) + for my $listkey (qw(curvestyle rangesize tuplesize)) { next unless defined $options{$listkey}; my @in = @{$options{$listkey}}; @@ -182,6 +184,35 @@ 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 # each histogram curve # @@ -1299,22 +1330,33 @@ conjunction with C<--dataid>. 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 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. A -similar situation exists with C<--colormap> where each point contains the -position I the color. There are other gnuplot styles that require more data -(such as error bars), but none of these are directly supported by the script. -They can still be used, however, by specifying the specific style with -C<--style>, and specifying how many values are needed for each point with -C<--rangesizeall> or C<--rangesize> or C<--extraValuesPerPoint>. Those options -that specify the range size are required I for styles not explicitly -supported by feedgnuplot; supported styles do the right thing automatically. +C<--circles>, for instance, then there's an extra range value: the radius. Many +other gnuplot styles require more data: errorbars, variable colors (C), variable sizes (C), 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 +options are required I for styles not explicitly supported by feedgnuplot; +supported styles do the right thing automatically. -More examples: if making a 2d plot of y error bars where gnuplot expects a -(x,y,ydelta) tuple for each point, you want C<--rangesizeall 2> because you have -one domain value (x) and 2 range values (y,ydelta). Gnuplot can also plot -lopsided y errorbars by giving a tuple (x,y,ylow,yhigh). This is similar as -before, but you want C<--rangesizeall 3> instead. +Specific example: if making a 2d plot of y error bars, the exact format can be +queried by running C and invoking C. This tells us +that there's a 3-column form: C and a 4-column form: C. With 2d plots feedgnuplot will always output the 1-value domain C, so +the rangesize is 2 and 3 respectively. Thus the following are equivalent: + $ 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 @@ -1564,7 +1606,8 @@ Interpret the X data as a time/date, parsed with the given format C<--colormap> 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 C<--rangesize>. +used to set the extents of the colors. Automatically sets the +C<--rangesize>/C<--tuplesize>. =item @@ -1592,7 +1635,8 @@ Do [not] draw points C<--circles> Plot with circles. This requires a radius be specified for each point. -Automatically sets the C<--rangesize>. C supported for 3d plots. +Automatically sets the C<--rangesize>/C<--tuplesize>. C supported for 3d +plots. =item @@ -1827,7 +1871,7 @@ file type is desired, use both C<--hardcopy> and C<--terminal> =item -C<--maxcurves xxx> +C<--maxcurves N> 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 @@ -1845,7 +1889,7 @@ replotted before being purged =item -C<--rangesize curveID xxx> +C<--rangesize curveID N> The options C<--rangesizeall> and C<--rangesize> set the number of values are needed to represent each point being plotted (see L +C<--tuplesize curveID N> + +Very similar to C<--rangesize>, but instead of specifying the I only, +this specifies the whole tuple. For instance if we're plotting circles, the +tuplesize is 3: C. In a 2D plot there's a 1-dimensional domain: +C, so the rangesize is 2: C. This dimensionality can be given +either way. + +=item + +C<--rangesizeall N> Like C<--rangesize>, but applies to I the curves. =item +C<--tuplesizeall N> + +Like C<--tuplesize>, but applies to I the curves. + +=item + C<--dump> Instead of printing to gnuplot, print to STDOUT. Very useful for debugging. It From e79659a10dcf505ebdc81b702dd8bdc8a663310b Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 23 Dec 2017 00:04:21 -0800 Subject: [PATCH 03/12] minor documentation updates --- bin/feedgnuplot | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index b2a7b21..cbebe4f 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -1677,7 +1677,10 @@ 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 plot. The y2-axis bound do not apply in 3d plots. The z-axis bounds apply -I to 3d plots or colormaps. +I 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 +instance C<--set 'xrange [20:10]'> to set the given inverted bounds. =item @@ -1819,9 +1822,9 @@ Gnuplot can plot both data and symbolic equations. C generally 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 -thing added or removed, so styling and such should be applied in the string. A -basic example: +multiple equations. The given strings are passed to gnuplot directly without +anything added or removed, so styling and such should be applied in the string. +A basic example: seq 100 | awk '{print $1/10, $1/100}' | feedgnuplot --with 'lines lw 3' --domain --ymax 1 @@ -1881,11 +1884,13 @@ system's memory when reading bogus data 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 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 is -replotted before being purged +kept. Does not make sense with 3d plots. No C<--monotonic> by default. The data +is replotted before being purged. This is useful in streaming plots where the +incoming data represents multiple iterations of the same process (repeated +simulations of the same period in time, for instance). =item From f2ac9c91b8c9cbd7fc25c780f498a34d694481e7 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 2 Feb 2018 12:22:32 -0800 Subject: [PATCH 04/12] slightly better documentation plot --- bin/feedgnuplot | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index cbebe4f..ab23c90 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -1205,45 +1205,45 @@ Simple plotting of piped data: $ seq 5 | awk '{print 2*$1, $1*$1}' | feedgnuplot --lines --points --legend 0 "data 0" --title "Test plot" --y2 1 - --terminal 'dumb 80,40' --exit + --unset grid --terminal 'dumb 80,40' --exit Test plot - 10 ++------+--------+-------+-------+-------+--------+-------+------*A 25 - + + + + + + + + **#+ - | : : : : : : data 0+**A*** | - | : : : : : : :** # | - 9 ++.......................................................**.##....| - | : : : : : : ** :# | - | : : : : : : ** # | - | : : : : : :** ##: ++ 20 - 8 ++................................................A....#..........| - | : : : : : **: # : | - | : : : : : ** : ## : | - | : : : : : ** :# : | - | : : : : :** B : | - 7 ++......................................**......##................| - | : : : : ** : ## : : ++ 15 - | : : : : ** : # : : | - | : : : :** : ## : : | - 6 ++..............................*A.......##.......................| - | : : : ** : ##: : : | - | : : : ** : # : : : | - | : : :** : ## : : : ++ 10 - 5 ++......................**........##..............................| - | : : ** : #B : : : | - | : : ** : ## : : : : | - | : :** : ## : : : : | - 4 ++...............A.......###......................................| - | : **: ##: : : : : | - | : ** : ## : : : : : ++ 5 - | : ** : ## : : : : : | - | :** ##B# : : : : : | - 3 ++.....**..####...................................................| - | **#### : : : : : : | - | **## : : : : : : : | - B** + + + + + + + + - 2 A+------+--------+-------+-------+-------+--------+-------+------++ 0 + 10 +-----------------------------------------------------------------+ 25 + | + + + + + + + *##| + | data 0 ***A*#* | + | ** # | + 9 |-+ ** ## | + | ** # | + | ** # | + | ** ## +-| 20 + 8 |-+ A # | + | ** # | + | ** ## | + | ** # | + | ** B | + 7 |-+ ** ## | + | ** ## +-| 15 + | ** # | + | ** ## | + 6 |-+ *A ## | + | ** ## | + | ** # | + | ** ## +-| 10 + 5 |-+ ** ## | + | ** #B | + | ** ## | + | ** ## | + 4 |-+ A ### | + | ** ## | + | ** ## +-| 5 + | ** ## | + | ** ##B# | + 3 |-+ ** #### | + | **#### | + | #### | + |## + + + + + + + | + 2 +-----------------------------------------------------------------+ 0 1 1.5 2 2.5 3 3.5 4 4.5 5 From 851eb46aa86ff7c9020ed861874813356019f46f Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 22 Feb 2018 12:37:46 -0800 Subject: [PATCH 05/12] Initial implementation of --vnlog. Undocumented --- bin/feedgnuplot | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index ab23c90..a3a3587 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -104,7 +104,7 @@ sub interpretCommandline $options{rangesize} = []; $options{tuplesize} = []; - GetOptions(\%options, 'stream:s', 'domain!', 'dataid!', '3d!', 'colormap!', 'lines!', 'points!', + 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@', @@ -157,6 +157,11 @@ sub interpretCommandline 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 for my $listkey (qw(histogram y2)) @@ -788,6 +793,33 @@ sub mainThread # The domain of the current point my @domain; + # column headers from vnlog + my @vnlog_headers; + if($options{vnlog}) + { + use lib '../../vnlog/lib'; + use Vnlog::Parser; + use Vnlog::Util; + + my $parser = Vnlog::Parser->new(); + while (defined ($_ = Vnlog::Util::get_unbuffered_line(*STDIN))) + { + if ( !$parser->parse($_) ) + { + die "";#"Reading '$filename': Error parsing vnlog line '$_': " . $parser->error(); + } + + my $keys = $parser->getKeys(); + if (defined $keys) + { + @vnlog_headers = @$keys; + last; + } + } + } + + + # 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 # number of seconds since the UNIX epoch. @@ -875,12 +907,13 @@ sub mainThread $domain0_numeric = makeDomainNumeric( $domain[0] ); } - my $id = -1; - + my $id = -1; + my $i_curve = 0; while(@fields) { - if($options{dataid}) { $id = shift @fields; } - else { $id++; } + if ($options{dataid}) { $id = shift @fields; } + elsif($options{vnlog} ) { $id = $vnlog_headers[$i_curve]; } + else { $id++; } my $rangesize = getRangeSize($id); last if @fields < $rangesize; @@ -890,6 +923,8 @@ sub mainThread @domain, splice( @fields, 0, $rangesize ) ) . "\n", $domain0_numeric); + + $i_curve++; } } From ca61de7441cfadd75f301bd36563c99d133cb313 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 22 Feb 2018 23:35:59 -0800 Subject: [PATCH 06/12] Vnlog integration --- bin/feedgnuplot | 77 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 14 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index a3a3587..5658472 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -797,16 +797,20 @@ sub mainThread my @vnlog_headers; if($options{vnlog}) { - use lib '../../vnlog/lib'; - use Vnlog::Parser; - use Vnlog::Util; + 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(*STDIN))) + while (defined ($_ = Vnlog::Util::get_unbuffered_line($pipe_in))) { if ( !$parser->parse($_) ) { - die "";#"Reading '$filename': Error parsing vnlog line '$_': " . $parser->error(); + die "Error parsing vnlog: $parser->{error}; looking at line '$_'"; } my $keys = $parser->getKeys(); @@ -816,6 +820,10 @@ sub mainThread last; } } + if(!@vnlog_headers) + { + die "Looked through all of the first file, and never saw a vnlog legend"; + } } @@ -911,9 +919,25 @@ sub mainThread my $i_curve = 0; while(@fields) { - if ($options{dataid}) { $id = shift @fields; } - elsif($options{vnlog} ) { $id = $vnlog_headers[$i_curve]; } - else { $id++; } + if ($options{dataid}) + { + $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); last if @fields < $rangesize; @@ -1346,19 +1370,31 @@ with the I-value at the start of that line. =head3 Curve indexing -By default, each column represents a separate curve. 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: +We index the curves in one of 3 ways: sequentially, explicitly with a +C<--dataid> or by C<--vnlog> headers. + +By default, each column represents a separate curve. The first column (after any +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 we get 5 different curves with one point in each. The first column, as produced by C, is B<2,4,6,8,10>. These are interpreted as the IDs of the curves to -be plotted. The C<--autolegend> option adds a legend using the given IDs to +be plotted. + +If we're plotting C data (L) 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 can interpret these +column labels if the C 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 many points as desired can appear on a single line. C<--domain> can be used in -conjunction with C<--dataid>. +conjunction with C<--dataid> or C<--vnlog>. =head3 Multi-value style support @@ -1625,6 +1661,19 @@ point in curve ID 20 =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 project: L. +With the C perl modules installed, we can read the vnlog column headers +with C. This replaces C<--dataid>, and we can do all the +normal things with these headers. For instance C will generate plot legends for each column in the vnlog, using the +vnlog column label in the legend. + +=item + C<--[no]3d> Do [not] plot in 3D. This only makes sense with C<--domain>. Each domain here is From 69bd05eddbd55cd881dc8e9b1b2021a6efc89dd9 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Thu, 22 Feb 2018 23:38:10 -0800 Subject: [PATCH 07/12] version bump --- Changes | 8 ++++++++ bin/feedgnuplot | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ad0a948..8421cb0 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,11 @@ +feedgnuplot (1.46) + + * Added --tuplesize and --tuplesizeall as alternatives to --rangesize + and --rangesizeall. Both forms are supported. + * Vnlog integration + + -- Dima Kogan Thu, 22 Feb 2018 23:37:54 -0800 + feedgnuplot (1.45) * zsh completion: --hardcopy, --image suggest filenames diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 5658472..410ba76 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.45'; +my $VERSION = '1.46'; my %options; interpretCommandline(); From 9df57fb65f3aa8c998412af9daf02f56a635a35b Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 23 Feb 2018 10:20:44 -0800 Subject: [PATCH 08/12] fixed typo --- bin/feedgnuplot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 410ba76..b0f8156 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -925,7 +925,7 @@ sub mainThread } elsif($options{vnlog} ) { - if( $icurve >= @vnlog_headers ) + if( $i_curve >= @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 From e8f9e090905ed07e2409d0b1c3e3991fe98f0d11 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 23 Feb 2018 10:21:29 -0800 Subject: [PATCH 09/12] version bump --- Changes | 6 ++++++ bin/feedgnuplot | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 8421cb0..ac69cb1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +feedgnuplot (1.47) + + * Fixed typo. Everything is un-broken now + + -- Dima Kogan Fri, 23 Feb 2018 10:21:13 -0800 + feedgnuplot (1.46) * Added --tuplesize and --tuplesizeall as alternatives to --rangesize diff --git a/bin/feedgnuplot b/bin/feedgnuplot index b0f8156..f1e097f 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.46'; +my $VERSION = '1.47'; my %options; interpretCommandline(); From d5e8906946c67c5acbb8f19695f7d91c37e7cd2c Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 23 Feb 2018 12:39:49 -0800 Subject: [PATCH 10/12] --vnlog now works with --domain --- bin/feedgnuplot | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index f1e097f..b2cf783 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -865,6 +865,7 @@ sub mainThread # 3d plots require $options{domain}, and dictate "x y" for the domain instead of just "x" my @fields = split; + my $i_column = 0; if($options{domain}) { @@ -876,6 +877,7 @@ sub mainThread $domain[0] = join (' ', splice( @fields, 0, $options{timefmt_Ncols}) ); $domain0_numeric = makeDomainNumeric( $domain[0] ); + $i_column -= $options{timefmt_Ncols}; } elsif(!$options{'3d'}) { @@ -884,6 +886,7 @@ sub mainThread next if @fields < 1+1; $domain[0] = $domain0_numeric = shift @fields; + $i_column -= 1; } else { @@ -892,6 +895,7 @@ sub mainThread next if @fields < 2+1; @domain = splice(@fields, 0, 2); + $i_column -= 2; } if( $options{monotonic} ) @@ -915,8 +919,7 @@ sub mainThread $domain0_numeric = makeDomainNumeric( $domain[0] ); } - my $id = -1; - my $i_curve = 0; + my $id = -1; while(@fields) { if ($options{dataid}) @@ -925,14 +928,14 @@ sub mainThread } elsif($options{vnlog} ) { - if( $i_curve >= @vnlog_headers ) + if( $i_column >= @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]; + $id = $vnlog_headers[$i_column]; } else { @@ -948,7 +951,7 @@ sub mainThread splice( @fields, 0, $rangesize ) ) . "\n", $domain0_numeric); - $i_curve++; + $i_column++; } } From 938e360e841c09c835435a0347f56f9cf72adaa6 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Fri, 23 Feb 2018 14:59:40 -0800 Subject: [PATCH 11/12] --vnlog now works with --domain. For real this time --- bin/feedgnuplot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index b2cf783..e7febab 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -877,7 +877,7 @@ sub mainThread $domain[0] = join (' ', splice( @fields, 0, $options{timefmt_Ncols}) ); $domain0_numeric = makeDomainNumeric( $domain[0] ); - $i_column -= $options{timefmt_Ncols}; + $i_column += $options{timefmt_Ncols}; } elsif(!$options{'3d'}) { @@ -886,7 +886,7 @@ sub mainThread next if @fields < 1+1; $domain[0] = $domain0_numeric = shift @fields; - $i_column -= 1; + $i_column += 1; } else { @@ -895,7 +895,7 @@ sub mainThread next if @fields < 2+1; @domain = splice(@fields, 0, 2); - $i_column -= 2; + $i_column += 2; } if( $options{monotonic} ) From 319e86b667291251ea99cb2d28cd54a812ed7319 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 24 Feb 2018 12:34:18 -0800 Subject: [PATCH 12/12] version bump --- Changes | 6 ++++++ bin/feedgnuplot | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ac69cb1..165dc12 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +feedgnuplot (1.48) + + * --vnlog works properly with --domain + + -- Dima Kogan Sat, 24 Feb 2018 12:33:50 -0800 + feedgnuplot (1.47) * Fixed typo. Everything is un-broken now diff --git a/bin/feedgnuplot b/bin/feedgnuplot index e7febab..f9c6570 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.47'; +my $VERSION = '1.48'; my %options; interpretCommandline();