mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
usage is now at the front, not at the end of the file
Ignore-this: 86899869bed3fd0c62b04f86f2ee7943 darcs-hash:20091206204850-0cb85-8fd04b4dce799512f1b6f0223e063846fdc4e6c8.gz
This commit is contained in:
parent
772f07d3c7
commit
d6e1dc5643
@ -15,6 +15,26 @@ autoflush STDOUT 1;
|
|||||||
# options
|
# options
|
||||||
my @curves = ();
|
my @curves = ();
|
||||||
|
|
||||||
|
my $usage = <<OEF;
|
||||||
|
Usage: $0 <options>
|
||||||
|
--[no]stream Do [not] display the data a point at a time, as it comes in
|
||||||
|
--[no]lines Do [not] draw lines to connect consecutive points
|
||||||
|
--xlabel xxx Set x-axis label
|
||||||
|
--ylabel xxx Set y-axis label
|
||||||
|
--y2label xxx Set y2-axis label
|
||||||
|
--title xxx Set the title of the plot
|
||||||
|
--legend xxx Set the label for a curve plot. Give this option multiple times for multiple curves
|
||||||
|
--xlen xxx Set the size of the x-window to plot
|
||||||
|
--xmin xxx Set the range for the x axis. These are ignored in a streaming plot
|
||||||
|
--xmax xxx Set the range for the x axis. These are ignored in a streaming plot
|
||||||
|
--ymin xxx Set the range for the y axis.
|
||||||
|
--ymax xxx Set the range for the y axis.
|
||||||
|
--y2min xxx Set the range for the y2 axis.
|
||||||
|
--y2max xxx Set the range for the y2 axis.
|
||||||
|
--y2 xxx Plot the data with this index on the y2 axis. These are 0-indexed
|
||||||
|
--hardcopy xxx If not streaming, output to a file specified here. Format inferred from filename
|
||||||
|
OEF
|
||||||
|
|
||||||
# stream in the data by default
|
# stream in the data by default
|
||||||
# point plotting by default
|
# point plotting by default
|
||||||
my %options = ( "stream" => 1,
|
my %options = ( "stream" => 1,
|
||||||
@ -43,7 +63,7 @@ GetOptions(\%options,
|
|||||||
"y2=i@",
|
"y2=i@",
|
||||||
"hardcopy=s",
|
"hardcopy=s",
|
||||||
"help",
|
"help",
|
||||||
"dump");
|
"dump") or die($usage);
|
||||||
|
|
||||||
# set up plotting style
|
# set up plotting style
|
||||||
my $style = "";
|
my $style = "";
|
||||||
@ -54,8 +74,7 @@ if(!$style) { $style = "points"; }
|
|||||||
|
|
||||||
if( defined $options{"help"} )
|
if( defined $options{"help"} )
|
||||||
{
|
{
|
||||||
usage();
|
die($usage);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# now start the data acquisition and plotting threads
|
# now start the data acquisition and plotting threads
|
||||||
@ -70,8 +89,7 @@ if($options{"stream"})
|
|||||||
}
|
}
|
||||||
if( !defined $options{"xlen"} )
|
if( !defined $options{"xlen"} )
|
||||||
{
|
{
|
||||||
usage();
|
die("$usage\nMust specify the size of the moving x-window. Doing nothing\n");
|
||||||
die("Must specify the size of the moving x-window. Doing nothing\n");
|
|
||||||
}
|
}
|
||||||
$xwindow = $options{"xlen"};
|
$xwindow = $options{"xlen"};
|
||||||
|
|
||||||
@ -338,27 +356,3 @@ sub pushNewEmptyCurve
|
|||||||
my $opts = "notitle ";
|
my $opts = "notitle ";
|
||||||
push @curves, [" $opts"];
|
push @curves, [" $opts"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub usage {
|
|
||||||
print "Usage: $0 <options>\n";
|
|
||||||
print <<OEF;
|
|
||||||
--[no]stream Do [not] display the data a point at a time, as it comes in
|
|
||||||
--[no]lines Do [not] draw lines to connect consecutive points
|
|
||||||
--xlabel xxx Set x-axis label
|
|
||||||
--ylabel xxx Set y-axis label
|
|
||||||
--y2label xxx Set y2-axis label
|
|
||||||
--title xxx Set the title of the plot
|
|
||||||
--legend xxx Set the label for a curve plot. Give this option multiple times for multiple curves
|
|
||||||
--xlen xxx Set the size of the x-window to plot
|
|
||||||
--xmin xxx Set the range for the x axis. These are ignored in a streaming plot
|
|
||||||
--xmax xxx Set the range for the x axis. These are ignored in a streaming plot
|
|
||||||
--ymin xxx Set the range for the y axis.
|
|
||||||
--ymax xxx Set the range for the y axis.
|
|
||||||
--y2min xxx Set the range for the y2 axis.
|
|
||||||
--y2max xxx Set the range for the y2 axis.
|
|
||||||
--y2 xxx Plot the data with this index on the y2 axis. These are 0-indexed
|
|
||||||
--hardcopy xxx If not streaming, output to a file specified here. Format inferred from filename
|
|
||||||
OEF
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user