mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-05 22:11:12 +08:00
--style and --rangesize can now take a comma-separated list of IDs
This commit is contained in:
parent
048b0db65c
commit
5dce1d8cda
@ -125,13 +125,6 @@ sub interpretCommandline
|
|||||||
exit 0;
|
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
|
# --style and --curvestyle are synonyms, as are --styleall and
|
||||||
# --curvestyleall, so fill that in
|
# --curvestyleall, so fill that in
|
||||||
if( $options{styleall} )
|
if( $options{styleall} )
|
||||||
@ -155,6 +148,33 @@ sub interpretCommandline
|
|||||||
delete $options{with};
|
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
|
# If we're plotting histograms, then set the default histogram options for
|
||||||
# each histogram curve
|
# each histogram curve
|
||||||
#
|
#
|
||||||
@ -1548,9 +1568,10 @@ report 0 or 1. 'cumulative' is the integral of the 'frequency' histogram.
|
|||||||
C<--style curveID style>
|
C<--style curveID style>
|
||||||
|
|
||||||
Additional styles per curve. With C<--dataid>, curveID is the ID. Otherwise,
|
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
|
it's the index of the curve, starting at 0. curveID can be a comma-separated
|
||||||
multiple curves. C<--styleall> does I<not> apply to curves that have a
|
list of IDs to which the given style should apply. Use this option multiple
|
||||||
C<--style>
|
times for multiple curves. C<--styleall> does I<not> apply to curves that have a
|
||||||
|
C<--style>.
|
||||||
|
|
||||||
=item
|
=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
|
of a point for a particular curve. This overrides any defaults that may exist
|
||||||
for this curve only.
|
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
|
=item
|
||||||
|
|
||||||
C<--rangesizeall xxx>
|
C<--rangesizeall xxx>
|
||||||
|
Loading…
Reference in New Issue
Block a user