Class: CompareCompressors::Plotter
- Inherits:
-
Object
- Object
- CompareCompressors::Plotter
- Defined in:
- lib/compare_compressors/plotter.rb
Overview
Plot compression results to gnuplot.
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_TERMINAL =
'png size 640, 480'
- DEFAULT_OUTPUT =
'compare_compressors.png'
- DEFAULT_LOGSCALE_SIZE =
false
- DEFAULT_AUTOSCALE_FIX =
false
- DEFAULT_SHOW_LABELS =
true
- DEFAULT_LMARGIN =
nil
- DEFAULT_TITLE =
nil
- DEFAULT_USE_CPU_TIME =
false
Instance Attribute Summary collapse
-
#autoscale_fix ⇒ Object
readonly
Returns the value of attribute autoscale_fix.
-
#group_results ⇒ Object
readonly
Returns the value of attribute group_results.
-
#io ⇒ Object
readonly
Returns the value of attribute io.
-
#lmargin ⇒ Object
readonly
Returns the value of attribute lmargin.
-
#logscale_size ⇒ Object
readonly
Returns the value of attribute logscale_size.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#show_labels ⇒ Object
readonly
Returns the value of attribute show_labels.
-
#terminal ⇒ Object
readonly
Returns the value of attribute terminal.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#use_cpu_time ⇒ Object
readonly
Returns the value of attribute use_cpu_time.
Instance Method Summary collapse
-
#initialize(terminal:, output:, logscale_size:, autoscale_fix:, show_labels:, lmargin:, title:, use_cpu_time:) ⇒ Plotter
constructor
A new instance of Plotter.
- #plot(group_results, pareto_only:, io: STDOUT) ⇒ Object
Constructor Details
#initialize(terminal:, output:, logscale_size:, autoscale_fix:, show_labels:, lmargin:, title:, use_cpu_time:) ⇒ Plotter
Returns a new instance of Plotter.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/compare_compressors/plotter.rb', line 17 def initialize( terminal:, output:, logscale_size:, autoscale_fix:, show_labels:, lmargin:, title:, use_cpu_time: ) @terminal = terminal @output = output @logscale_size = logscale_size @autoscale_fix = autoscale_fix @show_labels = show_labels @lmargin = lmargin @title = title @use_cpu_time = use_cpu_time @group_results = nil @io = nil end |
Instance Attribute Details
#autoscale_fix ⇒ Object (readonly)
Returns the value of attribute autoscale_fix.
37 38 39 |
# File 'lib/compare_compressors/plotter.rb', line 37 def autoscale_fix @autoscale_fix end |
#group_results ⇒ Object (readonly)
Returns the value of attribute group_results.
43 44 45 |
# File 'lib/compare_compressors/plotter.rb', line 43 def group_results @group_results end |
#io ⇒ Object (readonly)
Returns the value of attribute io.
44 45 46 |
# File 'lib/compare_compressors/plotter.rb', line 44 def io @io end |
#lmargin ⇒ Object (readonly)
Returns the value of attribute lmargin.
39 40 41 |
# File 'lib/compare_compressors/plotter.rb', line 39 def lmargin @lmargin end |
#logscale_size ⇒ Object (readonly)
Returns the value of attribute logscale_size.
36 37 38 |
# File 'lib/compare_compressors/plotter.rb', line 36 def logscale_size @logscale_size end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
35 36 37 |
# File 'lib/compare_compressors/plotter.rb', line 35 def output @output end |
#show_labels ⇒ Object (readonly)
Returns the value of attribute show_labels.
38 39 40 |
# File 'lib/compare_compressors/plotter.rb', line 38 def show_labels @show_labels end |
#terminal ⇒ Object (readonly)
Returns the value of attribute terminal.
34 35 36 |
# File 'lib/compare_compressors/plotter.rb', line 34 def terminal @terminal end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
40 41 42 |
# File 'lib/compare_compressors/plotter.rb', line 40 def title @title end |
#use_cpu_time ⇒ Object (readonly)
Returns the value of attribute use_cpu_time.
41 42 43 |
# File 'lib/compare_compressors/plotter.rb', line 41 def use_cpu_time @use_cpu_time end |
Instance Method Details
#plot(group_results, pareto_only:, io: STDOUT) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/compare_compressors/plotter.rb', line 46 def plot(group_results, pareto_only:, io: STDOUT) group_results = find_non_dominated(group_results) if pareto_only @group_results = group_results @io = io write end |