From 869fba996ded6cbf91f5c64f141a0f9213420b1c Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Mon, 18 Oct 2010 13:03:38 -0700 Subject: [PATCH] added option to plot with a square aspect ratio --- feedGnuplot.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/feedGnuplot.pl b/feedGnuplot.pl index 91902a9..1d95747 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -96,6 +96,8 @@ As an example, if line 3 of the input is "0 9 1 20" --size xxx Gnuplot size option + --square Plot data with aspect ratio 1 + --hardcopy xxx If not streaming, output to a file specified here. Format inferred from filename @@ -157,6 +159,7 @@ GetOptions(\%options, "curvestyle=s@", "extracmds=s@", "size=s", + "square!", "hardcopy=s", "maxcurves=i", "monotonic!", @@ -303,6 +306,12 @@ sub mainThread { 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"}; + + if($options{square}) + { + $options{size} = '' unless defined $options{size}; + $options{size} .= " ratio -1"; + } print(PIPE "set size $options{size}\n") if defined $options{size}; # For the specified values, set the legend entries to 'title "blah blah"'