added --geometry option to specify plot dimensions

This commit is contained in:
Dima Kogan 2012-02-11 20:47:23 -08:00
parent 7d7374e628
commit e30f0c792e
3 changed files with 9 additions and 2 deletions

View File

@ -102,7 +102,8 @@ sub interpretCommandline
'title=s', 'xlen=f', 'ymin=f', 'ymax=f', 'xmin=f', 'xmax=f', 'y2min=f', 'y2max=f',
'zmin=f', 'zmax=f', 'y2=s@', 'curvestyle=s{2}', 'curvestyleall=s', 'extracmds=s@',
'size=s', 'square!', 'square_xy!', 'hardcopy=s', 'maxcurves=i', 'monotonic!',
'extraValuesPerPoint=i', 'help', 'dump') or pod2usage(1);
'extraValuesPerPoint=i', 'help', 'dump',
'geometry=s') or pod2usage(1);
# handle various cmdline-option errors
if ( $options->{help} )
@ -252,7 +253,9 @@ sub mainThread
}
else
{
open PIPE, "|gnuplot $dopersist" or die "Can't initialize gnuplot\n";
my $geometry = defined $options{geometry} ?
"-geometry $options{geometry}" : '';
open PIPE, "|gnuplot $geometry $dopersist" or die "Can't initialize gnuplot\n";
}
autoflush PIPE 1;
@ -961,6 +964,8 @@ As an example, if line 3 of the input is "0 9 1 20"
--dump Instead of printing to gnuplot, print to STDOUT. For
debugging.
--geometry If using X11, specifies the size, position of the plot window
=head1 ACKNOWLEDGEMENT
This program is originally based on the driveGnuPlots.pl script from

View File

@ -35,5 +35,6 @@ complete -W \
--monotonic \
--extraValuesPerPoint \
--dump \
--geometry \
--curvestyle \
--legend' feedgnuplot

View File

@ -36,5 +36,6 @@ _arguments -S
'(--3d)--monotonic[Resets plot if an X in the past is seen]' \
'--extraValuesPerPoint[How many extra values are given for each data point]:' \
'--dump[Instead of printing to gnuplot, print to STDOUT]' \
'--geometry[The X11 geometry string]:geometry string:' \
'*--curvestyle[Additional styles for a curve]:curve id: :style:' \
'*--legend[Legend for a curve]:curve id: :legend:'