Class: Daru::Vector
- Inherits:
-
Object
- Object
- Daru::Vector
- 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
24 25 26 27 28 29 30 31 32 |
# File 'lib/gnuplotrb/external_classes/daru.rb', line 24 def to_gnuplot_points result = '' each_with_index do |value, index| quoted = index.is_a?(String) || index.is_a?(Symbol) result += quoted ? "\"#{index}\" " : "#{index} " result += "#{value}\n" end result end |