CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/Replay/plotit.sh
Views: 1798
1
#!/usr/bin/env bash
2
3
cmd="plot "
4
echo $#
5
while [ $# -gt 1 ]; do
6
if [[ "$1" == *.* ]]; then
7
cmd="$cmd 'plot.dat' using 1:'$1',"
8
else
9
cmd="$cmd 'plot2.dat' using 1:'$1',"
10
fi
11
shift
12
done
13
if [[ "$1" == *.* ]]; then
14
cmd="$cmd 'plot.dat' using 1:'$1'"
15
else
16
cmd="$cmd 'plot2.dat' using 1:'$1'"
17
fi
18
echo $cmd
19
cat <<EOF > _plot.gnu
20
set style data lines
21
set xlabel "time(s)"
22
$cmd
23
pause -1 "hit return to exit"
24
EOF
25
gnuplot _plot.gnu
26
27
28