Class: GraphSeries

Inherits:
Object
  • Object
show all
Defined in:
lib/autograph/graph_series.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xs, ys, l, p = nil) ⇒ GraphSeries

Returns a new instance of GraphSeries.



7
8
9
10
11
12
# File 'lib/autograph/graph_series.rb', line 7

def initialize(xs, ys, l, p=nil)
  @x_values = xs.map{|x| x.to_f}
  @y_values = ys.map{|x| x.to_f}
  @label = l
  @path = p
end

Instance Attribute Details

#labelObject

Returns the value of attribute label.



4
5
6
# File 'lib/autograph/graph_series.rb', line 4

def label
  @label
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/autograph/graph_series.rb', line 5

def path
  @path
end

#x_valuesObject

Returns the value of attribute x_values.



2
3
4
# File 'lib/autograph/graph_series.rb', line 2

def x_values
  @x_values
end

#y_valuesObject

Returns the value of attribute y_values.



3
4
5
# File 'lib/autograph/graph_series.rb', line 3

def y_values
  @y_values
end