Module: UnicodePlot

Defined in:
lib/youplot/backends/unicode_plot.rb

Overview

If the line color is specified as a number, the program will display an error message to the user and exit. Remove this patch when UnicodePlot is improved.

Class Method Summary collapse

Class Method Details

.lineplot(*args, **kw) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/youplot/backends/unicode_plot.rb', line 15

def lineplot(*args, **kw)
  if kw[:color].is_a? Numeric
    warn <<~EOS
      YouPlot: Line colors cannot be specified by numerical values.

      For more information, please see the following issue.
      https://github.com/red-data-tools/unicode_plot.rb/issues/34
    EOS
    YouPlot.run_as_executable ? exit(1) : raise(Error)
  end
  lineplot_original(*args, **kw)
end

.lineplot_originalObject



14
# File 'lib/youplot/backends/unicode_plot.rb', line 14

alias lineplot_original lineplot