Compare commits

...

19 Commits
v1.43 ... v1.47

Author SHA1 Message Date
Dima Kogan
e8f9e09090 version bump 2018-02-23 10:21:29 -08:00
Dima Kogan
9df57fb65f fixed typo 2018-02-23 10:20:44 -08:00
Dima Kogan
69bd05eddb version bump 2018-02-22 23:38:10 -08:00
Dima Kogan
ca61de7441 Vnlog integration 2018-02-22 23:35:59 -08:00
Dima Kogan
851eb46aa8 Initial implementation of --vnlog. Undocumented 2018-02-22 12:37:46 -08:00
Dima Kogan
f2ac9c91b8 slightly better documentation plot 2018-02-02 12:22:32 -08:00
Dima Kogan
e79659a10d minor documentation updates 2017-12-23 00:07:21 -08:00
Dima Kogan
2aa51d2a60 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
2017-12-22 23:56:07 -08:00
Dima Kogan
3bf2fa43ef 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
2017-12-22 23:30:25 -08:00
Dima Kogan
9cc67cdaeb new release 2017-10-29 14:02:46 -07:00
Dima Kogan
07a109b09a zsh completion: --hardcopy suggests filenames too
Generally --hardcopy should produce new files, but the completion is still
useful.
2017-10-11 18:42:17 -07:00
Dima Kogan
7b3040ecc9 --image now produces a nicer legend: just the filename 2017-10-11 18:32:31 -07:00
Dima Kogan
b59137c255 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
2017-09-30 23:16:41 -07:00
Dima Kogan
fec440c8b3 --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
2017-09-30 22:53:43 -07:00
Dima Kogan
5758865246 custom settings are now set AFTER all our internal ones
Thus the custom settings take precedence
2017-09-30 19:16:54 -07:00
Dima Kogan
6f091d1cf2 The version is now treated as a string not as a number
Before this a version 1.40 was seen as 1.4
2017-09-30 11:02:37 -07:00
Dima Kogan
1c853a2193 zsh now completes filenames 2017-06-27 18:27:26 -07:00
Dima Kogan
defcf5ef59 changelog bump, release 2017-06-20 16:44:55 -07:00
Dima Kogan
ba112a3bd9 --image always goes on the FRONT of the equation list
The image is intended to be background, so I want it to be rendered first, with
everything else on top of it
2017-06-20 16:44:02 -07:00
4 changed files with 278 additions and 101 deletions

35
Changes
View File

@@ -1,3 +1,34 @@
feedgnuplot (1.47)
* Fixed typo. Everything is un-broken now
-- Dima Kogan <dima@secretsauce.net> Fri, 23 Feb 2018 10:21:13 -0800
feedgnuplot (1.46)
* Added --tuplesize and --tuplesizeall as alternatives to --rangesize
and --rangesizeall. Both forms are supported.
* Vnlog integration
-- Dima Kogan <dima@secretsauce.net> Thu, 22 Feb 2018 23:37:54 -0800
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 <dima@secretsauce.net> Sun, 29 Oct 2017 13:56:28 -0700
feedgnuplot (1.44)
* --image draws its output beneath everything else
-- Dima Kogan <dima@secretsauce.net> Tue, 20 Jun 2017 16:44:30 -0700
feedgnuplot (1.43) feedgnuplot (1.43)
* Added --image * Added --image
@@ -37,8 +68,8 @@ feedgnuplot (1.39)
feedgnuplot (1.38) feedgnuplot (1.38)
* hardcopy defaults: * hardcopy defaults:
- no enhanced text mode - no enhanced text mode
- larger font size - larger font size
-- Dima Kogan <dima@secretsauce.net> Wed, 27 Jul 2016 22:15:11 -0700 -- Dima Kogan <dima@secretsauce.net> Wed, 27 Jul 2016 22:15:11 -0700

View File

@@ -20,9 +20,9 @@ sub parseversion
while(<PL>) while(<PL>)
{ {
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'"; die "Version mismatch. Changes says version is '$version', but 'bin/feedgnuplot' says it is '$1'";
} }

View File

@@ -15,7 +15,8 @@ use Text::ParseWords; # for shellwords
use Pod::Usage; use Pod::Usage;
use Time::Piece; use Time::Piece;
my $VERSION = 1.43; # Makefile.PL assumes this is in ''
my $VERSION = '1.47';
my %options; my %options;
interpretCommandline(); interpretCommandline();
@@ -101,8 +102,9 @@ sub interpretCommandline
$options{with} = ''; $options{with} = '';
$options{rangesize} = []; $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', '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', 'title=s', 'xlen=f', 'ymin=f', 'ymax=f', 'xmin=s', 'xmax=s', 'y2min=f', 'y2max=f',
'zmin=f', 'zmax=f', 'y2=s@', 'zmin=f', 'zmax=f', 'y2=s@',
@@ -112,7 +114,9 @@ sub interpretCommandline
'image=s', 'image=s',
'histogram=s@', 'binwidth=f', 'histstyle=s', 'histogram=s@', 'binwidth=f', 'histstyle=s',
'terminal=s', 'terminal=s',
'rangesize=s{2}', 'rangesizeall=i', 'extraValuesPerPoint=i', 'rangesize=s{2}', 'rangesizeall=i',
'tuplesize=s{2}', 'tuplesizeall=i',
'extraValuesPerPoint=i', # deprecated and undocumented
'help', 'dump', 'exit', 'version', 'help', 'dump', 'exit', 'version',
'geometry=s') or exit 1; 'geometry=s') or exit 1;
@@ -153,6 +157,11 @@ sub interpretCommandline
delete $options{with}; 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 # expand options that are given as comma-separated lists
for my $listkey (qw(histogram y2)) for my $listkey (qw(histogram y2))
@@ -160,7 +169,7 @@ sub interpretCommandline
@{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}} @{$options{$listkey}} = map split('\s*,\s*', $_), @{$options{$listkey}}
if defined $options{$listkey}; if defined $options{$listkey};
} }
for my $listkey (qw(curvestyle rangesize)) for my $listkey (qw(curvestyle rangesize tuplesize))
{ {
next unless defined $options{$listkey}; next unless defined $options{$listkey};
my @in = @{$options{$listkey}}; my @in = @{$options{$listkey}};
@@ -180,6 +189,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 # If we're plotting histograms, then set the default histogram options for
# each histogram curve # each histogram curve
# #
@@ -438,7 +476,7 @@ sub interpretCommandline
die "Couldn't read image '$options{image}'"; die "Couldn't read image '$options{image}'";
} }
push @{$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}; delete $options{image};
} }
} }
@@ -719,11 +757,6 @@ sub mainThread
print(PIPE "set xdata time\n"); 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 # set up histograms
$options{binwidth} ||= 1; # if no binwidth given, set it to 1 $options{binwidth} ||= 1; # if no binwidth given, set it to 1
print PIPE print PIPE
@@ -746,6 +779,11 @@ sub mainThread
sendRangeCommand( "zrange", $options{zmin}, $options{zmax} ); sendRangeCommand( "zrange", $options{zmin}, $options{zmax} );
sendRangeCommand( "cbrange", $options{zmin}, $options{zmax} ) if($options{colormap}); 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}});
@@ -755,6 +793,41 @@ sub mainThread
# The domain of the current point # The domain of the current point
my @domain; my @domain;
# column headers from vnlog
my @vnlog_headers;
if($options{vnlog})
{
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($pipe_in)))
{
if ( !$parser->parse($_) )
{
die "Error parsing vnlog: $parser->{error}; looking at line '$_'";
}
my $keys = $parser->getKeys();
if (defined $keys)
{
@vnlog_headers = @$keys;
last;
}
}
if(!@vnlog_headers)
{
die "Looked through all of the first file, and never saw a vnlog legend";
}
}
# The x-axis domain represented as a number. This is exactly the same as # 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 # $domain[0] unless the x-axis domain uses a timefmt. Then this is the
# number of seconds since the UNIX epoch. # number of seconds since the UNIX epoch.
@@ -842,12 +915,29 @@ sub mainThread
$domain0_numeric = makeDomainNumeric( $domain[0] ); $domain0_numeric = makeDomainNumeric( $domain[0] );
} }
my $id = -1; my $id = -1;
my $i_curve = 0;
while(@fields) while(@fields)
{ {
if($options{dataid}) { $id = shift @fields; } if ($options{dataid})
else { $id++; } {
$id = shift @fields;
}
elsif($options{vnlog} )
{
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
# ignore the data
last;
}
$id = $vnlog_headers[$i_curve];
}
else
{
$id++;
}
my $rangesize = getRangeSize($id); my $rangesize = getRangeSize($id);
last if @fields < $rangesize; last if @fields < $rangesize;
@@ -857,6 +947,8 @@ sub mainThread
@domain, @domain,
splice( @fields, 0, $rangesize ) ) . "\n", splice( @fields, 0, $rangesize ) ) . "\n",
$domain0_numeric); $domain0_numeric);
$i_curve++;
} }
} }
@@ -978,7 +1070,8 @@ sub updateCurveOptions
$usingoptions = "using 1:" . join(':', @rest); $usingoptions = "using 1:" . join(':', @rest);
} }
$curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions} $options{curvestyleall}";
$curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions}";
} }
sub getCurve sub getCurve
@@ -997,7 +1090,11 @@ sub getCurve
if( !exists $curveIndices{$id} ) 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 => '',
datastring_meta => [], datastring_meta => [],
datastring_offset => 0}; # push a curve with no data and no options datastring_offset => 0}; # push a curve with no data and no options
@@ -1167,45 +1264,45 @@ Simple plotting of piped data:
$ seq 5 | awk '{print 2*$1, $1*$1}' | $ seq 5 | awk '{print 2*$1, $1*$1}' |
feedgnuplot --lines --points --legend 0 "data 0" --title "Test plot" --y2 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 Test plot
10 ++------+--------+-------+-------+-------+--------+-------+------*A 25 10 +-----------------------------------------------------------------+ 25
+ + + + + + + + **#+ | + + + + + + + *##|
| : : : : : : data 0+**A*** | | data 0 ***A*#* |
| : : : : : : :** # | | ** # |
9 ++.......................................................**.##....| 9 |-+ ** ## |
| : : : : : : ** :# | | ** # |
| : : : : : : ** # | | ** # |
| : : : : : :** ##: ++ 20 | ** ## +-| 20
8 ++................................................A....#..........| 8 |-+ A # |
| : : : : : **: # : | | ** # |
| : : : : : ** : ## : | | ** ## |
| : : : : : ** :# : | | ** # |
| : : : : :** B : | | ** B |
7 ++......................................**......##................| 7 |-+ ** ## |
| : : : : ** : ## : : ++ 15 | ** ## +-| 15
| : : : : ** : # : : | | ** # |
| : : : :** : ## : : | | ** ## |
6 ++..............................*A.......##.......................| 6 |-+ *A ## |
| : : : ** : ##: : : | | ** ## |
| : : : ** : # : : : | | ** # |
| : : :** : ## : : : ++ 10 | ** ## +-| 10
5 ++......................**........##..............................| 5 |-+ ** ## |
| : : ** : #B : : : | | ** #B |
| : : ** : ## : : : : | | ** ## |
| : :** : ## : : : : | | ** ## |
4 ++...............A.......###......................................| 4 |-+ A ### |
| : **: ##: : : : : | | ** ## |
| : ** : ## : : : : : ++ 5 | ** ## +-| 5
| : ** : ## : : : : : | | ** ## |
| :** ##B# : : : : : | | ** ##B# |
3 ++.....**..####...................................................| 3 |-+ ** #### |
| **#### : : : : : : | | **#### |
| **## : : : : : : : | | #### |
B** + + + + + + + + |## + + + + + + + |
2 A+------+--------+-------+-------+-------+--------+-------+------++ 0 2 +-----------------------------------------------------------------+ 0
1 1.5 2 2.5 3 3.5 4 4.5 5 1 1.5 2 2.5 3 3.5 4 4.5 5
@@ -1273,41 +1370,64 @@ with the I<X>-value at the start of that line.
=head3 Curve indexing =head3 Curve indexing
By default, each column represents a separate curve. This is fine unless sparse We index the curves in one of 3 ways: sequentially, explicitly with a
data is to be plotted. With the C<--dataid> option, each point is represented by C<--dataid> or by C<--vnlog> headers.
2 values: a string identifying the curve, and the value itself. If we add
C<--dataid> to the original example: 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 $ 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 we get 5 different curves with one point in each. The first column, as produced
by C<awk>, is B<2,4,6,8,10>. These are interpreted as the IDs of the curves to by C<awk>, 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<vnlog> data (L<https://www.github.com/dkogan/vnlog>) 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<feedgnuplot --vnlog> can interpret these
column labels if the C<vnlog> 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 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 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 =head3 Multi-value style support
Depending on how gnuplot is plotting the data, more than one value may be needed 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 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 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 C<--circles>, for instance, then there's an extra range value: the radius. Many
similar situation exists with C<--colormap> where each point contains the other gnuplot styles require more data: errorbars, variable colors (C<with
position I<and> the color. There are other gnuplot styles that require more data points palette>), variable sizes (C<with points ps variable>), labels and so on.
(such as error bars), but none of these are directly supported by the script. The feedgnuplot tool itself does not know about all these intricacies, but they
They can still be used, however, by specifying the specific style with can still be used, by specifying the specific style with C<--style>, and
C<--style>, and specifying how many values are needed for each point with specifying how many values are needed for each point with any of
C<--rangesizeall> or C<--rangesize> or C<--extraValuesPerPoint>. Those options C<--rangesizeall, C<--tuplesizeall>, C<--rangesize>, C<--tuplesize>. These
that specify the range size are required I<only> for styles not explicitly options are required I<only> for styles not explicitly supported by feedgnuplot;
supported by feedgnuplot; supported styles do the right thing automatically. supported styles do the right thing automatically.
More examples: if making a 2d plot of y error bars where gnuplot expects a Specific example: if making a 2d plot of y error bars, the exact format can be
(x,y,ydelta) tuple for each point, you want C<--rangesizeall 2> because you have queried by running C<gnuplot> and invoking C<help yerrorbars>. This tells us
one domain value (x) and 2 range values (y,ydelta). Gnuplot can also plot that there's a 3-column form: C<x y ydelta> and a 4-column form: C<x y ylow
lopsided y errorbars by giving a tuple (x,y,ylow,yhigh). This is similar as yhigh>. With 2d plots feedgnuplot will always output the 1-value domain C<x>, so
before, but you want C<--rangesizeall 3> instead. 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 =head3 3D data
@@ -1541,6 +1661,19 @@ point in curve ID 20
=item =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<vnlog> project: L<https://www.github.com/dkogan/vnlog>.
With the C<vnlog> perl modules installed, we can read the vnlog column headers
with C<feedgnuplot --vnlog>. This replaces C<--dataid>, and we can do all the
normal things with these headers. For instance C<feedgnuplot --vnlog
--autolegend> will generate plot legends for each column in the vnlog, using the
vnlog column label in the legend.
=item
C<--[no]3d> C<--[no]3d>
Do [not] plot in 3D. This only makes sense with C<--domain>. Each domain here is Do [not] plot in 3D. This only makes sense with C<--domain>. Each domain here is
@@ -1557,7 +1690,8 @@ Interpret the X data as a time/date, parsed with the given format
C<--colormap> C<--colormap>
Show a colormapped xy plot. Requires extra data for the color. zmin/zmax can be 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 =item
@@ -1585,7 +1719,8 @@ Do [not] draw points
C<--circles> C<--circles>
Plot with circles. This requires a radius be specified for each point. Plot with circles. This requires a radius be specified for each point.
Automatically sets the C<--rangesize>. C<Not> supported for 3d plots. Automatically sets the C<--rangesize>/C<--tuplesize>. C<Not> supported for 3d
plots.
=item =item
@@ -1626,7 +1761,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 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 plot. The y2-axis bound do not apply in 3d plots. The z-axis bounds apply
I<only> to 3d plots or colormaps. I<only> 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 =item
@@ -1768,9 +1906,9 @@ Gnuplot can plot both data and symbolic equations. C<feedgnuplot> generally
plots data, but with this option can plot symbolic equations I<also>. This is plots data, but with this option can plot symbolic equations I<also>. This is
generally intended to augment data plots, since for equation-only plots you generally intended to augment data plots, since for equation-only plots you
don't need C<feedgnuplot>. C<--equation> can be passed multiple times for don't need C<feedgnuplot>. C<--equation> can be passed multiple times for
multiple equations. The given strings are passed to gnuplot directly without any multiple equations. The given strings are passed to gnuplot directly without
thing added or removed, so styling and such should be applied in the string. A anything added or removed, so styling and such should be applied in the string.
basic example: A basic example:
seq 100 | awk '{print $1/10, $1/100}' | seq 100 | awk '{print $1/10, $1/100}' |
feedgnuplot --with 'lines lw 3' --domain --ymax 1 feedgnuplot --with 'lines lw 3' --domain --ymax 1
@@ -1820,7 +1958,7 @@ file type is desired, use both C<--hardcopy> and C<--terminal>
=item =item
C<--maxcurves xxx> C<--maxcurves N>
The maximum allowed number of curves. This is 100 by default, but can be reset 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 with this option. This exists purely to prevent perl from allocating all of the
@@ -1830,20 +1968,22 @@ system's memory when reading bogus data
C<--monotonic> 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 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 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 kept. Does not make sense with 3d plots. No C<--monotonic> by default. The data
replotted before being purged 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 =item
C<--rangesize curveID xxx> C<--rangesize curveID N>
The options C<--rangesizeall>, C<--rangesize> and C<--extraValuesPerPoint> set The options C<--rangesizeall> and C<--rangesize> set the number of values are
the number of values are needed to represent each point being plotted (see needed to represent each point being plotted (see L</"Multi-value style
L</"Multi-value style support"> above). These options are I<only> needed if support"> above). These options are I<only> needed if unknown styles are used,
unknown styles are used, with C<--styleall> or C<--with> for instance. with C<--styleall> or C<--with> for instance.
C<--rangesize> is used to set how many values are needed to represent the range 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
@@ -1855,19 +1995,25 @@ rangesize should apply.
=item =item
C<--rangesizeall xxx> C<--tuplesize curveID N>
Very similar to C<--rangesize>, but instead of specifying the I<range> only,
this specifies the whole tuple. For instance if we're plotting circles, the
tuplesize is 3: C<x,y,radius>. In a 2D plot there's a 1-dimensional domain:
C<x>, so the rangesize is 2: C<y,radius>. This dimensionality can be given
either way.
=item
C<--rangesizeall N>
Like C<--rangesize>, but applies to I<all> the curves. Like C<--rangesize>, but applies to I<all> the curves.
C<--extraValuesPerPoint xxx> =item
Like C<--rangesizeall>, but instead of overriding the default, adds to it. For C<--tuplesizeall N>
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<only> needed if unknown styles are used, with C<--styleall> or Like C<--tuplesize>, but applies to I<all> the curves.
C<--with> for instance.
=item =item

View File

@@ -33,10 +33,10 @@ _arguments -S
'*--set[Additional 'set' gnuplot commands]:set-option' \ '*--set[Additional 'set' gnuplot commands]:set-option' \
'*--unset[Additional 'unset' gnuplot commands]:unset-option' \ '*--unset[Additional 'unset' gnuplot commands]:unset-option' \
'*--equation[Raw symbolic equation]:equation' \ '*--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[Plot data with square aspect ratio]' \
'--square_xy[For 3D plots, set square aspect ratio for ONLY the x,y axes]' \ '--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' \ '--maxcurves[The maximum allowed number of curves]:number of curves' \
'(--3d)--monotonic[Resets plot if an X in the past is seen]' \ '(--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'\ '(--rangesizeall)--extraValuesPerPoint[How many extra values are given for each data range]:N'\