Class: GraphSeries
- Inherits:
-
Object
- Object
- GraphSeries
- Defined in:
- lib/autograph/graph_series.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
-
#path ⇒ Object
Returns the value of attribute path.
-
#x_values ⇒ Object
Returns the value of attribute x_values.
-
#y_values ⇒ Object
Returns the value of attribute y_values.
Instance Method Summary collapse
-
#initialize(xs, ys, l, p = nil) ⇒ GraphSeries
constructor
A new instance of GraphSeries.
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
#label ⇒ Object
Returns the value of attribute label.
4 5 6 |
# File 'lib/autograph/graph_series.rb', line 4 def label @label end |
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/autograph/graph_series.rb', line 5 def path @path end |
#x_values ⇒ Object
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_values ⇒ Object
Returns the value of attribute y_values.
3 4 5 |
# File 'lib/autograph/graph_series.rb', line 3 def y_values @y_values end |