Ruby x gnuplot2013-11-17
グラフガ描キタイ !
Excel デハナク CUI デ !
トイウカ Ruby デコンナノ
ソンナアナタニ gnuplot
WHAT
gnuplot http://www.gnuplot.info/
!CUIタイプのグラフ描画ツール 対話型でもスクリプトでも利用可
HOW
01 インストール
01 インストール
ヒツヨウナモノ
1. Ruby
2. gnuplot
3. gem gnuplot
01 インストール
1. Ruby
モチロンカツアイシマス
01 インストール2. gnuplot
http://www.gnuplot.info/
!インストール
$ brew install gnuplot
!カクニン
$ gnuplot -V # バージョンヲヒョウジ
$ gnuplot # タイワモードヘ
> plot [-10:10] sin(x) # sinカーブガヒョウジサレタラOK
01 インストール3. gem Gnuplot
http://rubygems.org/gems/gnuplot
!
インストール
$ gem install Gnuplot
!
カクニン
$ irb
> require “gnuplot” # => true ナラOK
02 Hello, World!
02 Hello, World!require "gnuplot"
!
Gnuplot.open do |gp| # 01 Gnuplotブロックオープン
Gnuplot::Plot.new( gp ) do |plot| # 02 Plot.new
plot.xrange "[-10:10]" # 03 クカンヲキメテ
plot.data << Gnuplot::DataSet.new("sin(x)") # 04 グラフヲヒョウジ!
end
end
# => sin カーブガヒョウジサレタラOK
03 デモ
03 デモ
- サンプズ
- マルチプロット
- CSVデータノプロット
- フィットカーブ
マトメ
Ruby デグラフ
ワリトカンタンニデキマシタ
gnuplot: ビョウガ Ruby: ジゼンショリ
ソノタノサンプル !
https://github.com/rdp/ruby_gnuplot !
examples ナイニサンプル
ワザワザ Ruby デヤルカチガアルカハ…
ソノタノオプション !
Gruff x RMagic x ImageMagick https://github.com/topfunky/gruff !
GoogleCharts x Google Charts http://googlecharts.rubyforge.org/