ユーザ用ツール

サイト用ツール


01_linux:02_www:21_gnuplot

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

01_linux:02_www:21_gnuplot [2017/06/22 05:59] – 作成 matsui01_linux:02_www:21_gnuplot [2017/06/22 08:32] (現在) – [エラー] matsui
行 1: 行 1:
 +====== 21 グラフ描写(gnuplot) ======
  
 +
 +===== インストール =====
 +
 +[[http://www.gnuplot.info/]]
 +
 +=== yum ===
 +
 +<code>
 +# yum install gnuplot
 +</code>
 +
 +=== ソースから ===
 +
 +<code>
 +# 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
 +</code>
 +
 +
 +==== 使い方 ====
 +
 +これで、image.pngというファイルができる。
 +<code>
 +# gnuplot
 +gnuplot> set terminal png
 +gnuplot> set out 'image.png'
 +gnuplot> set title 'てすとイメージ'
 +gnuplot> plot sin(x) w line lc rgb 'orange'
 +gnuplot> quit
 +</code>
 +
 +{{: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}}