From a86cd8c6210bab849a8cf00ea35187cb61827dda Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 6 Jun 2010 21:44:10 -0700 Subject: [PATCH] options should be set if they're defined, not if they're true necessarily --- feedGnuplot.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/feedGnuplot.pl b/feedGnuplot.pl index 0f3b5a3..1793bcb 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -290,11 +290,11 @@ sub mainThread { print PIPE "set style data $style\n"; print PIPE "set grid\n"; - print(PIPE "set xlabel \"" . $options{"xlabel" } . "\"\n") if $options{"xlabel"}; - print(PIPE "set ylabel \"" . $options{"ylabel" } . "\"\n") if $options{"ylabel"}; - print(PIPE "set y2label \"" . $options{"y2label"} . "\"\n") if $options{"y2label"}; - print(PIPE "set title \"" . $options{"title" } . "\"\n") if $options{"title"}; - print(PIPE "set size $options{size}\n") if $options{size}; + print(PIPE "set xlabel \"" . $options{"xlabel" } . "\"\n") if defined $options{"xlabel"}; + print(PIPE "set ylabel \"" . $options{"ylabel" } . "\"\n") if defined $options{"ylabel"}; + print(PIPE "set y2label \"" . $options{"y2label"} . "\"\n") if defined $options{"y2label"}; + print(PIPE "set title \"" . $options{"title" } . "\"\n") if defined $options{"title"}; + print(PIPE "set size $options{size}\n") if defined $options{size}; # For the specified values, set the legend entries to 'title "blah blah"' if($options{"legend"})