#contents

*概要 [#j838ef7c]
-http://www.gnuplot.info/ からダウンロードできるフラフ描画ソフト
-エクセルと違って,プログラムで吐き出したデータをプログラムから呼び出して描画できるので個人的に便利

*縦線の書き方 [#d6b49a35]
-http://sobanomi2525.blogspot.com/2013/10/gnuplot.html
 set arrow from x1,y1 to x2,y2 nohead

*4.4系列からWindowsでグラフが描画できなくなった [#e7e13dbc]
**症状 [#b1a2bd95]
-Windows XPでGnuplot 4.2から4.4.4にバージョンアップしたら何故かグラフが描画できなくなった
--起動はする.
--コマンドラインでの操作は可能
--しかし plot sin(x) と実行しただけでフリーズする
--描画しようとしたウィンドウは現れるのだが,何も描画されず,コンソール画面もフリーズする&note{gnuplot-KT:参考:[[gnuplotの導入>http://kt3712.web.fc2.com/gnuplot/introduction.html]]};
**原因 [#d8d86270]
-Gnuplot4.4 系列から,デフォルトのウィンドウとして WxWidgets を利用するようになった
-set terminal wxt がこれにあたる

**対処法 [#fd4df034]
-set terminal windows とコマンドラインから指定すれば良い&note{gnuplot-Kato:参考:[[gnuplot4.4で default terminal が wxt? - 加藤精一のホームページ>http://www2.huhs.ac.jp/~h060043s/blog/index.php?e=9]]};&note{gnuplot-matsuura:参考:[[gnuplot 最新版。 - 担当授業のこととか,なんかそういった話題。>http://blog.goo.ne.jp/kei_matsuura2007/e/4c26e7129bcb8b7aba17627891b4e010]]};
-デフォルトのterminal が wxt なので毎回指定するのが面倒
-なのでgnuplot.iniに
 set terminal windows
-と書いておけば自動的に実行してterminalがwindowsになる
--gnuplot.iniは
---XPだと通常
 C:\Docuemnts and Settings\ユーザ名\Application Data\gnuplot.ini
---Win7だと
 C:\Users\ユーザ名\AppData\Roaming\gnuplot.ini
---に置いてある
---なければテキストで作る
-環境変数"GNUTERM"をwindowsとしておけば良いのだが,octaveからも参照されるらしい&note{gnuplot-matsuda:参考:[[gnuplot メモ>http://www.tatsuromatsuoka.com/gnuplot/Jpn/gnuplot_memo.html]]};のでiniファイルを作る話の方がおすすめ
**その他 [#v967b916]
-WxWidgetを利用すると,通常のgnuplotより綺麗な線で描画できるらしい&note{gnuplot-yonezawa:参考[[gnuplotのwxtターミナルについて - 米澤進吾 ホームページ>http://www.ss.scphys.kyoto-u.ac.jp/person/yonezawa/contents/program/gnuplot/wxt.html]]};
-でもうまく行く/行かない原因が分からない………

*Gnuplotで円グラフ [#gef90f4f]
-Gnuplotは単体で円グラフの描写は不可能&note{gnuplot-pie:参考:[[Gnuplot FAQ : 4.5 gnuplot は円グラフが書けますか>http://takeno.iee.niit.ac.jp/~shige/unix/gnuplot/gp-faq-j/faq-ja-20110307.html#SECTION00065000000000000000]]};
-Gnuplotを意識した[[plotutils>http://www.usf.uni-osnabrueck.de/~breiter/tools/piechart/piecharts.en.html]]なるものがある

*Gnuplotで描いたグラフをパワーポイントにベクターで貼り付ける [#e8da8057]
-GnuplotからEMF(拡張メタファイル)形式で出力するとよい&note{gnuplot-emf1:参照:[[パワーポイントにgnuplotで作った図を貼り付ける:環境構築:So-netブログ>http://setup.blog.so-net.ne.jp/2009-10-28-2]]};
 gnuplot> set term emf
 gnuplot> set output "figure.emf"
 gnuplot> splot 'data'
-ちなみにtermはterminalの略,replotはrepと略せる.
-PowerPoint側から挿入→図→ファイルからでインポート可能
-PowerPointは拡大とか色々あるのでベクタでやるのがベスト
**4.4.4からはショートカット [#oe8669b3]
-4.4.4からはプロット画面からCtrl-SでEMF形式で保存ができるようになった.神!&note{gnuplot-fukushima-twitter:参考:[[Twitter / @fukushima1981>https://twitter.com/#!/fukushima1981/status/151157982271504384]]};

*gnuplotのサンプリング間隔(メッシュを細かく描く方法) [#ycdf6710]
-gnuplot で細かく点を描画するのはsamples
 set samples 100,100
-メッシュを細かくするのは
 set isosamples 100
-どちらも標準が100のはず
-参考サイト:[[http://home.hiroshima-u.ac.jp/kentaro/jouhou2011/gnuplot_1.html]] &note{hiroshima-u-kentaro:[[http://home.hiroshima-u.ac.jp/kentaro/jouhou2011/gnuplot_1.html]], 2013-02-21閲覧. ただ、このサイトはちょっと情報が古い?};

*gnuplotで大きな数字をplotする場合 [#s2bfb96a]
-あまりにも大きな数字をplotしようとすると、''warning: integer overflow; changing to floating point''というメッセージが出る
-あまりにも大きな数字を設定、表示しようとすると、浮動小数点表示に切り替わる=ある程度細かい数字は丸められて消えてしまう
-まあ、画面上に出す以上、そんなに精度必要ないものな。

*gnuplotでヒストグラムを描画する方法 [#zad9bb2e]
-[[gnuplot でヒストグラム(頻度分布図)を描画する - Qiita>https://qiita.com/iwiwi/items/4c7635d4c84bc785e47a]]&note{iwiwi-qiita-gnuplot-histogram:iwiwi, [[gnuplot でヒストグラム(頻度分布図)を描画する - Qiita>https://qiita.com/iwiwi/items/4c7635d4c84bc785e47a]],2013-02-28公開  ,2013-02-28更新 2018-12-07閲覧};

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS