lib/gnuplotrb/plot.rb
##
# Parses given array and returns Hamster::Vector of Datasets
Parses given array and returns Hamster::Vector of Datasets
Parses given array and returns Hamster :: Vector of Datasets
def parse_datasets_array(datasets)
      case datasets[0]
      when Hamster::Vector
        datasets[0]
      when (defined?(Daru) ? Daru::DataFrame : nil)
        set_name_from_daru_dataframe(datasets[0])
        Hamster::Vector.new(datasets[0].map { |ds| dataset_from_any(ds) })
      else
        Hamster::Vector.new(datasets.map { |ds| dataset_from_any(ds) })
      end
    end
def parse_datasets_array ( datasets ) case datasets [ 0 ] when Hamster :: Vector datasets [ 0 ] when ( defined? ( Daru ) ? Daru :: DataFrame : nil ) set_name_from_daru_dataframe ( datasets [ 0 ] ) Hamster :: Vector . new ( datasets [ 0 ] . map { | ds | dataset_from_any ( ds ) } ) else Hamster :: Vector . new ( datasets . map { | ds | dataset_from_any ( ds ) } ) end end
Parses given array and returns Hamster::Vector of Datasets
Parses given array and returns Hamster :: Vector of Datasets
datasets
<not_specific>