[feedgnuplot] 03/11: --style and --rangesize can now take a comma-separated list of IDs
Dima Kogan
dima at secretsauce.net
Fri Nov 25 22:53:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkogan-guest pushed a commit to branch debian
in repository feedgnuplot.
commit 5dce1d8cda5cd3e9b03f5370a7a62902116417c5
Author: Dima Kogan <dima at secretsauce.net>
Date: Fri Nov 25 14:39:15 2016 -0800
--style and --rangesize can now take a comma-separated list of IDs
---
bin/feedgnuplot | 45 +++++++++++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 10 deletions(-)
diff --git a/bin/feedgnuplot b/bin/feedgnuplot
index bf494ba..9a2e940 100755
--- a/bin/feedgnuplot
+++ b/bin/feedgnuplot
@@ -125,13 +125,6 @@ sub interpretCommandline
exit 0;
}
- # expand options that are given as comma-separated lists
- for my $listkey (qw(histogram y2))
- {
- @{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
- if defined $options{$listkey};
- }
-
# --style and --curvestyle are synonyms, as are --styleall and
# --curvestyleall, so fill that in
if( $options{styleall} )
@@ -155,6 +148,33 @@ sub interpretCommandline
delete $options{with};
}
+
+ # expand options that are given as comma-separated lists
+ for my $listkey (qw(histogram y2))
+ {
+ @{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
+ if defined $options{$listkey};
+ }
+ for my $listkey (qw(curvestyle rangesize))
+ {
+ next unless defined $options{$listkey};
+ my @in = @{$options{$listkey}};
+ my $N = @in / 2;
+ my @out;
+ for my $i (0..$N-1)
+ {
+ my $key = $in[2*$i];
+ my $value = $in[2*$i + 1];
+ for my $key_new (split('\s*,\s*', $key))
+ {
+ push @out, $key_new, $value;
+ }
+ }
+
+ @{$options{$listkey}} = @out;
+ }
+
+
# If we're plotting histograms, then set the default histogram options for
# each histogram curve
#
@@ -1548,9 +1568,10 @@ report 0 or 1. 'cumulative' is the integral of the 'frequency' histogram.
C<--style curveID style>
Additional styles per curve. With C<--dataid>, curveID is the ID. Otherwise,
-it's the index of the curve, starting at 0. Use this option multiple times for
-multiple curves. C<--styleall> does I<not> apply to curves that have a
-C<--style>
+it's the index of the curve, starting at 0. curveID can be a comma-separated
+list of IDs to which the given style should apply. Use this option multiple
+times for multiple curves. C<--styleall> does I<not> apply to curves that have a
+C<--style>.
=item
@@ -1696,6 +1717,10 @@ 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
for this curve only.
+With C<--dataid>, curveID is the ID. Otherwise, it's the index of the curve,
+starting at 0. curveID can be a comma-separated list of IDs to which the given
+rangesize should apply.
+
=item
C<--rangesizeall xxx>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/feedgnuplot.git
More information about the debian-science-commits
mailing list