mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-09-23 23:18:08 +08:00
added --equation-above and --equation-below
This commit is contained in:
@@ -99,6 +99,8 @@ sub interpretCommandline
|
||||
$options{set} = [];
|
||||
$options{unset} = [];
|
||||
$options{equation} = [];
|
||||
$options{'equation-below'} = [];
|
||||
$options{'equation-above'} = [];
|
||||
|
||||
$options{curvestyleall} = '';
|
||||
$options{styleall} = '';
|
||||
@@ -120,7 +122,7 @@ sub interpretCommandline
|
||||
'style=s{2}', 'curvestyle=s{2}', 'curvestyleall=s', 'styleall=s', 'with=s', 'extracmds=s@', 'set=s@', 'unset=s@',
|
||||
'every=s{2}', 'everyall=s',
|
||||
'square!', 'square_xy!', 'square-xy!', 'squarexy!', 'hardcopy=s', 'maxcurves=i', 'monotonic!', 'timefmt=s',
|
||||
'equation=s@',
|
||||
'equation=s@', 'equation-below=s@', 'equation-above=s@',
|
||||
'image=s',
|
||||
'histogram=s@', 'binwidth=f', 'histstyle=s',
|
||||
'terminal=s',
|
||||
@@ -503,6 +505,10 @@ sub interpretCommandline
|
||||
unshift @{$options{equation}}, qq{"$options{image}" binary filetype=auto flipy with rgbimage title "$options{image}"};
|
||||
delete $options{image};
|
||||
}
|
||||
|
||||
# --equation-below is a synonym of --equation
|
||||
push @{$options{equation}}, @{$options{'equation-below'}};
|
||||
@{$options{'equation-below'}} = [];
|
||||
}
|
||||
|
||||
sub getGnuplotVersion
|
||||
@@ -1156,7 +1162,8 @@ sub plotStoredData
|
||||
my @extraopts = map {$_->{options}} @nonemptyCurves;
|
||||
|
||||
my $body = join('', map { "$_," } @{$options{equation}});
|
||||
$body .= join(', ' , map({ "'-' $_" } @extraopts) );
|
||||
$body .= join(', ' , map({ "'-' $_" } @extraopts) );
|
||||
$body .= join('', map { ",$_" } @{$options{'equation-above'}});
|
||||
|
||||
if($options{'3d'}) { print PIPE "splot $body\n"; }
|
||||
else { print PIPE "plot $body\n"; }
|
||||
@@ -2079,6 +2086,8 @@ the y-axis extents are not specified (C<--ymin>, C<--ymax>, C<--set 'yrange
|
||||
properly. Since this option is just a passthrough to gnuplot, finer control can
|
||||
be achieved by passing in C<--equation> and C<--set yrange ...> directly.
|
||||
|
||||
=item
|
||||
|
||||
C<--equation xxx>
|
||||
|
||||
Gnuplot can plot both data and symbolic equations. C<feedgnuplot> generally
|
||||
@@ -2107,6 +2116,18 @@ points, and I I<also> plot a true circle as a parametric equation.
|
||||
|
||||
=item
|
||||
|
||||
C<--equation-below xxx>
|
||||
|
||||
Synonym for C<--equation>. These are rendered I<below> all the other data.
|
||||
|
||||
=item
|
||||
|
||||
C<--equation-above xxx>
|
||||
|
||||
Like C<--equation>, but is rendered I<on top> of all the other data.
|
||||
|
||||
=item
|
||||
|
||||
C<--square>
|
||||
|
||||
Plot data with aspect ratio 1. For 3D plots, this controls the aspect ratio for
|
||||
|
Reference in New Issue
Block a user