From 78bb507f36c681fa24bef48f51b2bf45faa71d2c Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 23 Oct 2010 00:50:32 -0700 Subject: [PATCH] made pushNewEmptyCurve() a local subroutine of the subroutine that uses it --- feedGnuplot.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/feedGnuplot.pl b/feedGnuplot.pl index a61ebda..a6f3ac5 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -496,6 +496,12 @@ sub plotStoredData sub newCurve { + sub pushNewEmptyCurve + { + my $opts = "notitle "; + push @curves, [{"options" => " $opts"}]; + } + # I optionally pass in the title of this plot and any additional options separately. The title # COULD be a part of $opts, but this raises an issue in the no-title case. When no title is # specified, gnuplot will still add a legend entry with an unhelpful '-' label. I can still grep @@ -550,12 +556,7 @@ sub addCurveOption } } -sub pushNewEmptyCurve -{ - my $opts = "notitle "; - push @curves, [{"options" => " $opts"}]; -} - +# function to add a point to the plot. Assumes that the curve indexed by $idx already exists sub pushPoint { my ($idx, $xy) = @_;