diff --git a/feedGnuplot.pl b/feedGnuplot.pl index 4e99f6a..95c9aab 100755 --- a/feedGnuplot.pl +++ b/feedGnuplot.pl @@ -224,11 +224,6 @@ elsif(!$options{colormap}) } } -# set up plotting style -my $style = ''; -if($options{lines}) { $style .= 'lines';} -if($options{points}) { $style .= 'points';} - # list containing the plot data. Each element is a reference to a list, representing the data for # one curve. The first 'point' is a hash describing various curve parameters. The rest are all # references to lists of (x,y) tuples @@ -353,6 +348,11 @@ sub mainThread print PIPE "set y2range [". $options{y2min} . ":" . $options{y2max} ."]\n" if length( $options{y2min} . $options{y2max} ); } + # set up plotting style + my $style = ''; + if($options{lines}) { $style .= 'lines';} + if($options{points}) { $style .= 'points';} + # if any of the ranges are given, set the range print PIPE "set xrange [". $options{xmin} . ":" . $options{xmax} ."]\n" if length( $options{xmin} . $options{xmax} ); print PIPE "set yrange [". $options{ymin} . ":" . $options{ymax} ."]\n" if length( $options{ymin} . $options{ymax} );