module Graph::Function::PlotConfig

Public Instance Methods

set_up(plot) click to toggle source
# File lib/graph/function/plot_config.rb, line 4
def set_up(plot)
  plot.ylabel ylabel
  plot.xlabel 'input size'
  plot.terminal (t = Graph::Function.configuration.terminal)
  plot.output Graph::Function.configuration.output unless t == 'x11'
end

Private Instance Methods

ylabel() click to toggle source
# File lib/graph/function/plot_config.rb, line 12
def ylabel
  if Graph::Function.configuration.memory
    Graph::Function.configuration.trials == 1 ? 'total allocation memsize (bytes)' : 'average total allocation memsize (bytes)'
  else
    Graph::Function.configuration.trials == 1 ? 'execution time (seconds)' : 'average execution time (seconds)'
  end
end