You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
453 B
27 lines
453 B
11 years ago
|
#!/bin/bash
|
||
11 years ago
|
|
||
|
cmd="plot "
|
||
|
echo $#
|
||
|
while [ $# -gt 1 ]; do
|
||
11 years ago
|
if [[ "$1" == *.* ]]; then
|
||
|
cmd="$cmd 'plot.dat' using 1:'$1',"
|
||
|
else
|
||
|
cmd="$cmd 'plot2.dat' using 1:'$1',"
|
||
|
fi
|
||
11 years ago
|
shift
|
||
|
done
|
||
11 years ago
|
if [[ "$1" == *.* ]]; then
|
||
|
cmd="$cmd 'plot.dat' using 1:'$1'"
|
||
|
else
|
||
|
cmd="$cmd 'plot2.dat' using 1:'$1'"
|
||
|
fi
|
||
|
echo $cmd
|
||
11 years ago
|
cat <<EOF > _plot.gnu
|
||
|
set style data lines
|
||
|
set xlabel "time(s)"
|
||
|
$cmd
|
||
11 years ago
|
pause -1 "hit return to exit"
|
||
11 years ago
|
EOF
|
||
|
gnuplot _plot.gnu
|
||
|
|