Skip to content

Instantly share code, notes, and snippets.

@walkingmask
Created May 13, 2015 14:58
Show Gist options
  • Select an option

  • Save walkingmask/0cb16f7f9bfbdbaec780 to your computer and use it in GitHub Desktop.

Select an option

Save walkingmask/0cb16f7f9bfbdbaec780 to your computer and use it in GitHub Desktop.
#!/bin/sh
# 情報工学実験1レポート4 gnuplot用スクリプト
# 実行方法
# sh plot.sh xplot.txt yplot.txt
if [ $# -eq 2 ] ; then
file1=$1
file2=$2
else
echo "file名を2つ指定してください"
exit 1
fi
paste $file1 $file2 > plot.txt
gnuplot<<EOF
set terminal pdf
set output "plot.pdf"
set xlabel "x(m)"
set ylabel "y(m)"
plot "plot.txt" w l # 線・点のスタイルを変えたい場合は要変更
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment