1
0
Fork 0

Be compatible with newer versions of tail and gnuplot.

This commit is contained in:
curt 2009-04-15 18:20:29 +00:00 committed by Tim Moore
parent 3b478871dd
commit c74cdade0b

View file

@ -147,7 +147,7 @@ sub quick_plot_vs_time {
my( $png_image ) = "$plot_file.png"; my( $png_image ) = "$plot_file.png";
# strip the leading header off the file so gnuplot doesn't squawk # strip the leading header off the file so gnuplot doesn't squawk
system( "tail +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); system( "tail -n +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" );
# create the gnuplot command file # create the gnuplot command file
open( CMD, ">$tmpcmd" ); open( CMD, ">$tmpcmd" );
@ -184,11 +184,11 @@ sub quick_plot {
my( $png_image ) = "$plot_file.png"; my( $png_image ) = "$plot_file.png";
# strip the leading header off the file so gnuplot doesn't squawk # strip the leading header off the file so gnuplot doesn't squawk
system( "tail +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); system( "tail -n +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" );
# create the gnuplot command file # create the gnuplot command file
open( CMD, ">$tmpcmd" ); open( CMD, ">$tmpcmd" );
print CMD "set terminal png color\n"; print CMD "set terminal png\n";
print "png_image = $png_image\n"; print "png_image = $png_image\n";
print CMD "set output \"$png_image\"\n"; print CMD "set output \"$png_image\"\n";
print CMD "set xlabel \"$xtitle\"\n"; print CMD "set xlabel \"$xtitle\"\n";