ruby - gnuplot on mac
DESCRIPTION
便利なグラフ描画ツール gnuplot を Ruby から操作できる gem Gnuplot をご紹介します。 Mac 上でのインストール方法、基本的な使い方を解説しています。TRANSCRIPT
![Page 1: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/1.jpg)
Ruby x gnuplot2013-11-17
![Page 2: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/2.jpg)
グラフガ描キタイ !
Excel デハナク CUI デ !
トイウカ Ruby デコンナノ
![Page 3: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/3.jpg)
ソンナアナタニ gnuplot
![Page 4: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/4.jpg)
WHAT
![Page 5: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/5.jpg)
gnuplot http://www.gnuplot.info/
!CUIタイプのグラフ描画ツール 対話型でもスクリプトでも利用可
![Page 6: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/6.jpg)
HOW
![Page 7: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/7.jpg)
01 インストール
![Page 8: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/8.jpg)
01 インストール
ヒツヨウナモノ
1. Ruby
2. gnuplot
3. gem gnuplot
![Page 9: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/9.jpg)
01 インストール
1. Ruby
モチロンカツアイシマス
![Page 10: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/10.jpg)
01 インストール2. gnuplot
http://www.gnuplot.info/
!インストール
$ brew install gnuplot
!カクニン
$ gnuplot -V # バージョンヲヒョウジ
$ gnuplot # タイワモードヘ
> plot [-10:10] sin(x) # sinカーブガヒョウジサレタラOK
![Page 11: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/11.jpg)
01 インストール3. gem Gnuplot
http://rubygems.org/gems/gnuplot
!
インストール
$ gem install Gnuplot
!
カクニン
$ irb
> require “gnuplot” # => true ナラOK
![Page 12: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/12.jpg)
02 Hello, World!
![Page 13: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/13.jpg)
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
![Page 14: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/14.jpg)
03 デモ
![Page 15: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/15.jpg)
03 デモ
- サンプズ
- マルチプロット
- CSVデータノプロット
- フィットカーブ
![Page 16: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/16.jpg)
マトメ
![Page 17: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/17.jpg)
Ruby デグラフ
![Page 18: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/18.jpg)
ワリトカンタンニデキマシタ
![Page 19: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/19.jpg)
gnuplot: ビョウガ Ruby: ジゼンショリ
![Page 20: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/20.jpg)
ソノタノサンプル !
https://github.com/rdp/ruby_gnuplot !
examples ナイニサンプル
![Page 21: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/21.jpg)
ワザワザ Ruby デヤルカチガアルカハ…
![Page 22: Ruby - gnuplot on Mac](https://reader034.vdocuments.mx/reader034/viewer/2022042607/5591a5df1a28abea098b4665/html5/thumbnails/22.jpg)
ソノタノオプション !
Gruff x RMagic x ImageMagick https://github.com/topfunky/gruff !
GoogleCharts x Google Charts http://googlecharts.rubyforge.org/