*gnuplotの図の修正 #contents(fromhere) **set size squareしたときとかのBoundingBox修正 http://t16web.lanl.gov/Kawano/gnuplot/postscript.html http://www.meteorology.jp/XOOPS/modules/newbb/viewtopic.php?topic_id=32&forum=2 なども参照。 1.fixbb.shを作成。 #!/bin/bash input=$1 output=$2 eps2eps ${input} ${input}_temp ;\ sed -n '1,/^%%BoundingBox:/p' ${input} |\ sed -e '$d' >\ ${output} ;\ grep '^%%BoundingBox:' ${input}_temp >>\ ${output} ;\ sed -n '/^%%BoundingBox:/,$p' ${input} |\ sed -e '1d' >>\ ${output} ;\ rm ${input}_temp 2.あとは使うだけ。 ./fixbb.sh before.ps after.ps **hyphenをminusにする http://wwwnucl.ph.tsukuba.ac.jp/~inakura/gnuplot/gnuplot.html#hyphen http://nao.s164.xrea.com/td/2005-11-18.html なども参照。 できあがったpostscript中の [(フォント名) 140.0 0.0 true true 0 ( 数字)] の数字のところをいじればよい。とりあえず、 sed -e 's/true true 0 (-/true true 0 (\\261/g' \ before.ps > after.ps でだいたいうまくいく。 **フォントのComputer Modern化 http://granular.blog39.fc2.com/blog-entry-28.html http://takeno.iee.niit.ac.jp/~foo/gp-jman/data/20080929/gnuplot-ja-div/node415.html http://chaos.fiz.uni-lj.si/~horvat/publishing/gnuplot4.x/ps_fontfile_doc.pdf http://www.it.ecei.tohoku.ac.jp/~buchiken/moin/%E5%B0%8F%E6%8A%80/Linux/LaTeX%E3%81%A7%E3%81%AE%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E5%9F%8B%E3%82%81%E8%BE%BC%E3%81%BF http://www.it.ecei.tohoku.ac.jp/~buchiken/moin/%E5%B0%8F%E6%8A%80/Linux/gnuplot%E3%81%AE%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E5%A4%89%E6%9B%B4 なども参照。 設定を set fontpath '/usr/share/texmf/fonts/type1/public/cm-super' set terminal postscript enhanced color fontfile 'sfrm1000.pfb' set terminal postscript enhanced color 'SFRM1000' set fontpath '/usr/share/texmf-texlive/fonts/type1/bluesky/cm' set term postscript enhanced color fontfile 'cmr10.pfb' set term postscript enhanced color fontfile 'cmmi10.pfb' set term postscript enhanced color fontfile 'cmsy10.pfb' みたいにすればよい。 パスは適当にいじること。 pfbフォントがない、pfbがpfaに変換されない、 とかいうときはしかるべきファイル、ソフトを落とす。 多分、 set terminal postscript enhanced color 'SFRM1000' とすることで、目盛とか含めた全部のフォントがCM化される。 フォントにCMR10とか使うと、 spaceにフォントが当てられてしまうのでおすすめしない。 # 目盛の値が文字化けする。 対数プロットしたときの目盛は set format y "%3.1t {/CMSY10 \243} 10^{%L}" とかでいいかな。 # CM化した後で「hyphenをminusにする」の作業をしても # ちゃんとminusに入れ替わってくれた。 # SFRM1000の\261のフォントもminusなんだね、きっと。 **その他 Inkscapeとの連携でバグるとき http://www26.atwiki.jp/titech-phys-kakomon/pages/38.html#id_2f542da3 [[戻る>TeXばなし]] ----