« Eclipseのインストール | メイン | ubuntu 7.10のtex環境 »

gnuplotとpowerpoint。

gnuplotでそこそこ見やすい図を出した後、powerpointに貼る為の手順。
そこそこ見やすい→プレゼン向きな色を使用する, でかくて見やすいフォントでかつアンチエイリアスを効かせる

0. imagemagickをインストールする(付属するconvertをインストールする為)。
$ sudo apt-get install imagemagick

1. gnuplotを起こして図を書く
$ gnuplot
gnuplot> plot sin(x), cos(x) lt 3 #黄緑色はプレゼンで見にくいので、青に色を変える
gnuplot> set title "sin curve & co-sin curve"
gnuplot> set terminal postscript color "Arial" 18 #色つきかつフォントをArial 18ptにする
Terminal type set to 'postscript'
Options are 'landscape noenhanced color colortext \
dashed dashlength 1.0 linewidth 1.0 defaultplex \
palfuncparam 2000,0.003 \
butt "Arial" 18'
gnuplot> set output "curves.eps"
gnuplot> replot
gnuplot> exit

3. convertでjpgに変換
$ convert -density 288 -geometry 50% curves.eps curves.jpg
実際にやってみたら、図が縦になってしまっていたので、以下のようにコマンドを打つ。
$ convert -rotate 90 curves.jpg curves90.jpg


他にもいろいろできるので、詳しくは以下を参照してがんばる。
・gnuplot関連
GNUPLOTメモ : http://ryuiki.agbi.tsukuba.ac.jp/~nishida/MEMO/GNUPLOT/
GNUPLOT - not so Frequently Asked Questions - : http://t16web.lanl.gov/Kawano/gnuplot/
http://www.proton.jp/apps/gnuplot.html
http://www.cp.cmc.osaka-u.ac.jp/~fumiko/tips/gnuplot.html

・convert関連
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/289convgraph.html
http://i.loveruby.net/d/20021208.html