出力結果をファイルに保存するには
media> a.out > res1000.dat
等とすればよい.
たとえば,
2 0.0278 3 0.0556 4 0.0833 5 0.1111 6 0.1389 7 0.1667 8 0.1389 9 0.1111 10 0.0833 11 0.0556 12 0.0279
というデータがあるとする.このようなデータをグラフ表示するにはgnuplotが便利である.gnuplotはグラフ作成の汎用プログラムで数値計算やシミュレーション結果をすばやく表示できるので広く使われています.くわしい操作法はマニュアル
http://lagendra.s.kanazawa-u.ac.jp/ogurisu/manuals/gnuplot/を参照ください.
muleなどで加工したデータをtest.datに入れる.terminalから
media> gnuplot
を起動. gnuplotのコマンドラインで
gnuplot> plot "test.dat" with linespoints
を入力すると下のような図が画面に現れます.
いったんpostscript形式でファイルに保存し,gvで表示させてプリンターから出力します.gnuplotのコマンドラインで
gnuplot> set term postscript gnuplot> set output "test.ps" gnuplot> replot gnuplot> quit
termのシェルから
media> gv test.ps
とします.gvのメニューバーから印刷を選べばプリンターに出力されます.
二つのデータを表示する場合.
plot "test1.dat" w lp, "test2.dat" w lp
ここで'w lp'は'with linespoints'の略記法.