LoginSignup
0
0

More than 5 years have passed since last update.

gnuplot / x-y1-y2の2軸散布図(plot)

Last updated at Posted at 2019-03-25

サンプルコード

引数のファイルを入力とし、グラフ化する

#!/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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0