サンプルコード
引数のファイルを入力とし、グラフ化する
# !/bin/sh
do_gnuplot() {
local FNAME="$1"
gnuplot << _EOT_
set terminal aqua
set title "Age v.s Height & Weight"
set xlabel "age"
set ylabel "height"
set y2label "wheight"
# set autoscale
# 1 2 3 4 5 6 7 8 9 10 11 12 13 14
# date,FY,age,検診場所,age2,身長,体重,体脂肪率,総コレ,LDL,HDL,中性脂肪,γGTP,
set xrange[20:50] ; set xtics 1
set yrange[151:176] ; set ytics 2
set y2range[60:110] ; set y2tics 10
set grid
plot "$FNAME" using 5:6 with linespoints axes x1y1 , \
"$FNAME" using 5:7 with points axes x1y2
_EOT_
}
do_gnuplot $1