Class: Daru::DataFrame
- Inherits:
-
Object
- Object
- Daru::DataFrame
- Defined in:
- lib/gnuplotrb/external_classes/daru.rb
Overview
Methods to take data for GnuplotRB plots.
Instance Method Summary collapse
Instance Method Details
#to_gnuplot_points ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/gnuplotrb/external_classes/daru.rb', line 9 def to_gnuplot_points result = '' each_row_with_index do |row, index| quoted = index.is_a?(String) || index.is_a?(Symbol) result += quoted ? "\"#{index}\" " : "#{index} " result += row.to_a.join(' ') result += "\n" end result end |