fc2ブログ

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

«  | HOME |  »

プロフィール

bigben

Author:bigben

エンジニア見習い。ブログ再始動中。

twitter

カレンダー

12 | 2009/01 | 02
- - - - 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

FC2カウンター

ブログ内検索