- 追加された行はこの色です。
- 削除された行はこの色です。
[[小林研究室ホームページ]]
+gnuplotの起動
端末上で,gnuplot と入力する.
+使用例
plot "foo.dat" u 1:3 w l
と入力すると、データファイル "foo.dat" の第1列を横軸,第3列を縦軸としてグラフを描きます。
その他、以下のような使い方ができます:
--線を引くには
plot "foo.dat" with line
もしくは省略形を使って
plot "foo.dat" w l
--点を打った上に線を引くには
plot "foo.dat" with linespoint
--データファイル foo.dat の一列目を横軸にして、二列目と三列目を縦軸にして二本のグラフを描くには
plot "foo.dat" t "2nd column" w l, "foo.dat" u 1:3 t "3rd column" w l
--複数のデータファイルからグラフを描くには
plot "foo.dat" title "This is from foo.dat", "bar.dat" title "This is from bar.dat"
--両対数グラフを書くには
set logscale xy
としてから,plot する
--x 軸だけ対数目盛にするには
set logscale x
--y 軸だけ対数目盛にするには
set logscale y
--x 軸のレンジを変更するには
set xrange [0:10]
--終了するには
quit
-その他、使い方の詳細については, gnuplot のオンラインマニュアルを参照してください。 gnuplot 上で以下のように入力すれば表示されます。
help plot
help set xrange