Method: PlotData#read_general_data
- Defined in:
- lib/shunkuntype/plot_data.rb
#read_general_data(file, x_col, y_col) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/shunkuntype/plot_data.rb', line 31 def read_general_data(file, x_col, y_col) begin File.open(file,'r'){|file| while line=file.gets do tmp=line.chomp.split(',') @data << [tmp[x_col],tmp[y_col]] end } rescue => e p e end end |