gnuplot
フィッティング
gnuplot > f(x)=a*exp(-(x-b)**2/(2*c**2))
gnuplot > fit [xmin:xmax] f(x) 'data.dat' u 1:2 via a,b,c
gnuplot > print a,b
3次元プロット
3次元データを3次元空間にプロットする
gnuplot> set ticslevel 0
gnuplot> set dgrid3d 30,30
gnuplot> set hidden3d
gnuplot> splot "datafile.dat" u 1:2:3 with lines
等高線をプロットする
gnuplot> set contour
gnuplot> unset surface
等高線の間隔の設定
gnuplot> set cntrparam levels 10
線の種類
太さ
plot **** lw 2
色
plot **** lc rgb "red"
対数プロット
gnuplot> set logscale
gnuplot> set xrange[1:3]
gnuplot> plot "data1.dat" using 1:2 notitle with lines,\
gnuplot> "data2.dat" usi 1:3 ti "凡例1" w lines
タイトルとか軸名とか
gnuplot> set xlabel "x"
gnuplot> set ylabel "y"
gnuplot> set title "タイトル"
gnuplot> replot
目盛の間隔と表示
gnuplot> set xtics 2
gnuplot> set format y "10^{%g"}
gnuplot> set terminal postscript eps enhanced
その他
グラフの縦と横の比を揃える
set size square
eps保存
set term post enh eps color
最終更新:2009年11月11日 20:56