33win com trang chính thức đăng nhập và tải app đăng ký của nhà cái 33win.com nhận 88k miễn phí chỉ với vài bước cơ bản. Tham gia ngay!

Irisのデータをプロットする 有名なアヤメのデータセットを用いて散布図を描いてみます。 まずCSVファイルを用意します。 iris.csv 使用するライブラリ numo-gnuplot Jupyter Notebookを使うとき IRuby : Ruby kernel for Jupyter/IPython Notebook Numo.gnuplot のかわりに Numo.noteplotメソッドを使います。 require 'daru' require 'numo/gnuplot' df = Daru::DataFrame.from_csv 'iris.csv' setosa = df.where(df.Name.eq 'Iris-setosa') versicolor = df.where(df.Name.eq 'Iris-versicolor') virginica = df.wh
Free software, open standards, and web services for interactive computing across all programming languages JupyterLab: A Next-Generation Notebook Interface JupyterLab is the latest web-based interactive development environment for notebooks, code, and data. Its flexible interface allows users to configure and arrange workflows in data science, scientific computing, computational journalism, and ma
require 'open3' Open3.popen3('gnuplot') do |gp_in, gp_out, gp_err| gp_in.puts "set size square" gp_in.puts "set xrange [-5:5]" gp_in.puts "set yrange [-5:5]" gp_in.puts "set parametric" gp_in.puts "set obj rect behind " << "from screen 0, screen 0 to screen 1, screen 1 " << "fillcolor rgb 'black'" Signal.trap(:INT) do gp_in.close print gp_err.read exit 0 end loop do plot = "plot " # 時計の外周の円 plot <
Prev Next Tips/Programing gnuplot † gnuplotをパイプで開いてそこにコマンドを流し込めばOK。 open("|/usr/bin/gnuplot", "w") {|gp| gp.puts "set term postscript eps" gp.puts "set out 'graph.eps'" gp.puts "pl sin(x) w l" } これを、うまい感じにラップしてくれてるrgplotというのがある。gem install gnuplotでインストール。 例は、rgplotのプロジェクトページにあるので、ちょっと別の例 def gen_dataset(num) data = Array.new (0..num).each {|i| data << Gnuplot::DataSet.new("'./dirname-#{i}/result/s
Ruby/Gtk を用いた Gnuplot のフロントエンドです。 3次元プロットでリアルタイムに視点を変えることもできます。 現在のバージョン rubyplot-0.1.tar.gz スクリーンショットはこちら。 以下の環境で動作確認しています。 Linux 2.0.36 Ruby 1.4.0 ruby-gtk-SNAPSHOT-19990912 Gnuplot 3.7.0.1 (+ 1.1.9) 他に拙作 gtkmenu.rb が必要です。 更新遍歴 ver 0.1 初リリース Link Gnuplotの日本語化・拡張機能パッチ 山賀さんによる Gnuplot+ のホームページ。 Ruby/Gtk のページへもどる Ruby のページへもどる ホームページへもどる 高橋 仁 (hitoshi.takahashi@kek.jp)
Ruby で多項式等をあつかえる ようになったので, これのグラフを表示させてみたい. ここでは, 特別なクラスを使わずに gnuplot を駆動してグラフを表示してみる. (RAAを探すとグラフを表示するクラスがあるのでそれを使うと良い.) 次の6行のスクリプトを実行すると, y=x**2 と y=x**3 のグラフが 5秒間ずつ表示される. #!/usr/local/bin/ruby gp=IO.popen("gnuplot","w"); gp.puts 'plot x**2'; sleep 5; gp.puts 'plot [-2:2] x**3'; sleep 5; gp.close; 'plot x**2' の部分の文字列は "x**2 のグラフをプロットしろ" という gnuplot のコマンドだ. 'plot [-2:2] x**3' の "[-2:2]" の部分は, x軸の
gnuplotを用いて素早く2次元データプロットグラフを作成するためのGUIフロントエンド「gpgui」を作成します。 少ないステップでレポートや学会発表、研究論文等の学術目的に最適化されたグラフ出力を得ることを目指しています。 開発言語としてruby、また拡張ライブラリruby/Gtk2を使用します。 ダウンロード 最新リリース gpgui 2.0.1 (日付: 2009-05-18) gpgui 2.0.0 (日付: 2009-03-15) gpgui-beta 2.0beta3 (日付: 2009-02-07) gpgui-beta 2.0beta2 (日付: 2009-01-21) gpgui-beta 2.0beta1 (日付: 2008-12-14)
最近グラフを書く機会が多いのですが、ただ単純にデータファイルをプロットすればいいという単純な作業はむしろ少なく、データファイルを読み込んでそれから何がしかの計算をした結果をグラフとして出力するという少々込み入った作業が大半を占めています。いちいち中間ファイルを作ると後からみてわけがわからなくなるので、できるだけ計算とグラフ描画はひとつの処理としてまとめてしまいたいと考えました。そこでRubyからgnuplotをコントロールすることを考えました。 以前『リアルタイム Gnuplot』と称してC++からGnuplotに(擬似)リアルタイム描画させるということを紹介しましたが、今回も基本コンセプトは同じで、RubyからパイプでGnuplotにコマンドを発行してやり、グラフを描画することになります。しかしC++のときのように一から作りこむ必要はなく、そのような用途向けのライブラリが既にRubyには
[Rubyforge Project page] [ChangeLog] [Authors] [License] History and Background Gnuplot is a program that has a rich language for the generation of plots. It has a unique place in academia as it was one of the first freely available programs for plot generation. I started using gnuplot over 10 years ago while pursuing my Master's degree in Physics and have been using it actively ever since. Versi
そんなライブラリあったのね。 $ sudo apt-get install libgnuplot-rubyhttp://rgplot.rubyforge.org/を参考にしながらやってみる。 ~$ irb >> require "gnuplot" => true >> Gnuplot.open{|gp|Gnuplot::Plot.new(gp){|p| p.data<<Gnuplot::DataSet.new("x+2")}} => #<Gnuplot::Plot:0xb7d0bf44 @data=[#<Gnuplot::DataSet:0xb7d0ba80 @data="x+2">], @sets=[], @cmd="plot"> >>見事に出たな。 インタラクティブ性を追求するならgnuplotをそのまま使った方が良さそうだ。
久末です。 私がちょろっと開発しているSEOツールをご紹介します。 SEOツールといっても今回は非常に基本的なもので、ある検索ワードで検索した順位を定期的に取得し、グラフ化するものです。 開発環境 Ruby on Rails gnuplot mechanize cron 仕組み Railsのtaskでキーワードを検索エンジンで検索し、100位までの順位を保存 上記のtaskをcronで定期実行 Webアプリ側でプロットしたグラフを閲覧 事前準備 Rails のプロジェクト作成 gnuplotおよびRuby gnuplotをインストール(Ruby gems) Ruby mechanizeをインストール(Ruby gems) もろもろ。 できたもの 3日間、一時間毎に、あるキーワードでGoogle検索した結果の上位100位をグラフをPNGで出力してみました。 コード また、こんど。 感想 1時
思いは言葉に。 はてなブログは、あなたの思いや考えを残したり、 さまざまな人が綴った多様な価値観に触れたりできる場所です。
Gnuplot has a very simple conceptual model. Calls to Set are made to set parameters and either Plot or Splot is called to generate the actual plot. The dataset to be plotted can be specified in a number of ways, contained in a separate file, generated from a function, read from standard input, or read immediately after the plot command. The object model for the Ruby gnuplot wrapper directly mimics
Pardon if this is spelled out somewhere, but I couldn't find documentation on how to plot disjoint line segments. As I figured out the recipe, I thought I'd share. The trick is to insert nil values in your x-y data wherever you want to start a new segment: # Example of plotting disjoint line segments. The # secret is that a nil separates a segment... require 'gnuplot' Gnuplot.open do |gp| Gnuplot:
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く