Module: Mirlo::Plotting

Included in:
Dataset
Defined in:
lib/mirlo/plotting.rb

Instance Method Summary collapse

Instance Method Details

#plot(x_feature = nil, y_feature = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/mirlo/plotting.rb', line 3

def plot(x_feature = nil, y_feature = nil)
  Gnuplot.open do |gp|
    Gnuplot::Plot.new(gp) do |plot|
      plot.title title
      plot.xlabel 'x'
      plot.ylabel 'y'

      plot.data = to_gnu_plot_datasets
    end
  end
end