lib/gnuplotrb/external_classes/array.rb
# taken for example from current gnuplot bindings
# @return [String] array converted to Gnuplot format
taken for example from current gnuplot bindings
taken for example from current gnuplot bindings
def to_gnuplot_points
    return '' if self.empty?
    case self[0]
    when Array
      self[0].zip(*self[1..-1]).map { |a| a.join(' ') }.join("\n")
    when Numeric
      join("\n")
    else
      self[0].zip(*self[1..-1]).to_gnuplot_points
    end
  end
def to_gnuplot_points return '' if self . empty? case self [ 0 ] when Array self [ 0 ] . zip ( * self [ 1 .. - 1 ] ) . map { | a | a . join ( ' ' ) } . join ( "\n" ) when Numeric join ( "\n" ) else self [ 0 ] . zip ( * self [ 1 .. - 1 ] ) . to_gnuplot_points end end
taken for example from current gnuplot bindings
taken for example from current gnuplot bindings
array converted to Gnuplot format
array converted to Gnuplot format
String