====== 21 グラフ描写(gnuplot) ====== ===== インストール ===== [[http://www.gnuplot.info/]] === yum === # yum install gnuplot === ソースから === # tar zxvf gnuplot-5.0.6.tar.gz # cd gnuplot-5.0.6 # ./configure --prefix=/usr/local --with-gd=/usr/lib64/libgd.so # make && make install ==== 使い方 ==== これで、image.pngというファイルができる。 # gnuplot gnuplot> set terminal png gnuplot> set out 'image.png' gnuplot> set title 'てすとイメージ' gnuplot> plot sin(x) w line lc rgb 'orange' gnuplot> quit {{:01_linux:02_www:image.png?400|}} ==== エラー ==== Could not find/open font when opening font "arial", using internal non-scalable font フォントが無いですよ。というエラー 下記を環境変数を設定してあげるとフォントが綺麗になる。 export GDFONTPATH=/usr/share/fonts/vlgothic/ export GNUPLOT_DEFAULT_GDFONT=VL-Gothic-Regular {{tag>gnuplot}}