2014-01-05 09:23:48 -04:00
|
|
|
#!/bin/bash
|
2014-01-05 01:38:09 -04:00
|
|
|
|
|
|
|
cmd="plot "
|
|
|
|
echo $#
|
|
|
|
while [ $# -gt 1 ]; do
|
2014-01-05 09:23:48 -04:00
|
|
|
if [[ "$1" == *.* ]]; then
|
|
|
|
cmd="$cmd 'plot.dat' using 1:'$1',"
|
|
|
|
else
|
|
|
|
cmd="$cmd 'plot2.dat' using 1:'$1',"
|
|
|
|
fi
|
2014-01-05 01:38:09 -04:00
|
|
|
shift
|
|
|
|
done
|
2014-01-05 09:23:48 -04:00
|
|
|
if [[ "$1" == *.* ]]; then
|
|
|
|
cmd="$cmd 'plot.dat' using 1:'$1'"
|
|
|
|
else
|
|
|
|
cmd="$cmd 'plot2.dat' using 1:'$1'"
|
|
|
|
fi
|
|
|
|
echo $cmd
|
2014-01-05 01:38:09 -04:00
|
|
|
cat <<EOF > _plot.gnu
|
|
|
|
set style data lines
|
|
|
|
set xlabel "time(s)"
|
|
|
|
$cmd
|
2014-02-17 18:11:46 -04:00
|
|
|
pause -1 "hit return to exit"
|
2014-01-05 01:38:09 -04:00
|
|
|
EOF
|
|
|
|
gnuplot _plot.gnu
|
|
|
|
|