「gnuplot」の編集履歴(バックアップ)一覧はこちら
「gnuplot」(2009/11/11 (水) 20:56:10) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
&sizex(6){gnuplot}
#contents
*フィッティング
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"
*対数プロット
>&bold(){gnuplot> set logscale}
>&bold(){gnuplot> set xrange[1:3]}
>&bold(){gnuplot> plot "data1.dat" using 1:2 notitle with lines,\}
>&bold(){gnuplot> "data2.dat" usi 1:3 ti "凡例1" w lines}
*タイトルとか軸名とか
>&bold(){gnuplot> set xlabel "x"}
>&bold(){gnuplot> set ylabel "y"}
>&bold(){gnuplot> set title "タイトル"}
>&bold(){gnuplot> replot}
*目盛の間隔と表示
>&bold(){gnuplot> set xtics 2}
>&bold(){gnuplot> set format y "10^{%g}"}
>&bold(){gnuplot> set terminal postscript eps enhanced}
*その他
グラフの縦と横の比を揃える
>set size square
eps保存
>set term post enh eps color
&sizex(6){gnuplot}
#contents
*フィッティング
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"
*対数プロット
>&bold(){gnuplot> set logscale}
>&bold(){gnuplot> set xrange[1:3]}
>&bold(){gnuplot> plot "data1.dat" using 1:2 notitle with lines,\}
>&bold(){gnuplot> "data2.dat" usi 1:3 ti "凡例1" w lines}
*タイトルとか軸名とか
>&bold(){gnuplot> set xlabel "x"}
>&bold(){gnuplot> set ylabel "y"}
>&bold(){gnuplot> set title "タイトル"}
>&bold(){gnuplot> replot}
*目盛の間隔と表示
>&bold(){gnuplot> set xtics 2}
>&bold(){gnuplot> set format y "10^{%g}"}
>&bold(){gnuplot> set terminal postscript eps enhanced}
*その他
グラフの縦と横の比を揃える
>set size square
eps保存
>set term post enh eps color