aboutsummaryrefslogtreecommitdiffstats
path: root/math/ruby-gnuplot/pkg-descr
blob: 93c2db26df8c4cea08e84b5aa351f117e738c512 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Ruby/Gnuplot is a pipe-based interface to the gnuplot package.
Provides the full capabilities of the gnuplot package to Ruby
programs.  Inspired by the Python Gnuplot package that works on the
same principle.  Here's an example usage of Ruby/Gnuplot:

    require 'narray'
    require 'gplot/Gnuplot'

    x = NArray.sfloat(100).indgen!
    y = x.collect { |i| i*i }

    plot = Plot.new ()

    plot.setTitle ("Demo 1");
    plot.setXlabel ("X");
    plot.setYlabel ("X^2");

    ds = DataSet.new (y, {"with"=> "lines", "title"=>"Data"})
    ds.setGrid (x)

    plot.draw ( ds )

WWW: http://physci.gmu.edu/~gmiller/gnuplot/