Method: PlotPersonalData#initialize
- Defined in:
- lib/shunkuntype/plot.rb
#initialize ⇒ PlotPersonalData
Returns a new instance of PlotPersonalData.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shunkuntype/plot.rb', line 5 def initialize plot_data = read_data() make_data_file(plot_data) text=["Typing speed [words/min]","Work minutes [min]"] opts = {:title=>"Elapsed time vs #{text[0]}", :plot=>"plot \"#{$temp.path}\" using 1:2 w st\n", :xlabel=>"Elapsed time[hrs]",:ylabel=>text[0],:xtics=>"0 2"} listplot(opts) opts = {:title=>"Elapsed time vs #{text[1]}", :plot=>"plot \"#{$temp.path}\" using 1:3 w st\n", :xlabel=>"Elapsed time[hrs]",:ylabel=>text[1],:xtics=>"0 2"} listplot(opts) end |