ImageMagickとgnuplot小ネタ
pngでグラフを描くときはImageMagickで変換した方がきれいに出力される。
ホームページのメニューからBinary Releases -> Windowsを選び、一番上のファイルをダウンロード。
そのままファイルを開いてインストール。設定変更はしなくてよい。
インストールしたら、コマンドラインから
% convert test.eps test.png
とするだけで変換できる。ものすごく簡単。
ただしデフォルトの解像度が低すぎるので
% convert -density 200x200 test.eps test.png
と-density オプションを使う。数字は1インチ当たりのドット数。
あとこんな使い方もできるらしい。
インストール方法・大まかな使い方は以下のサイトを参考。
http://monpe.cliff.jp/computer/others/gnuplot_200702220.html
http://www.proton.jp/apps/imagemagick.html
それから小ネタを2つ。
「Å」を使うときは
gnuplot> set term postscript eps enhanced
でenhancedオプションを使い、
gnuplot> set encoding iso_8859_1
でエンコーディングを指定してから
gnuplot> set xlabel "wavelength [{\305}]"
とÅのコード{\305}を入力する。
2種類以上の曲線をプロットするときに、特定の曲線の範囲だけ変更するときは
gnuplot> plot [-3:3][-2:2] f(x), g(x)
と指定する。順番はx軸、y軸。
以下のサイトを参考にした。
http://co.maxwell.jp/?page=gnuplot#p4
http://tortoise1.math.ryukoku.ac.jp/~takataka/gnuplot/#range
2009.01.13 | Comments(0) | Trackback(0) | gnuplot tips
