mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 07:31:12 +08:00
Improved permeability on pipelines
This commit is contained in:
parent
203e48e0ed
commit
958ce45635
@ -37,17 +37,20 @@ module Uplot
|
||||
end
|
||||
|
||||
def run
|
||||
input_lines = readlines.map(&:chomp)
|
||||
# Sometimes the input file does not end with a newline code.
|
||||
while input = Kernel.gets(nil)
|
||||
input_lines = input.split(/\R/)
|
||||
case @ptype
|
||||
when 'hist', 'histogram'
|
||||
histogram(input_lines).render
|
||||
histogram(input_lines)
|
||||
when 'line', 'lineplot'
|
||||
line(input_lines).render
|
||||
line(input_lines)
|
||||
when 'lines'
|
||||
lines(input_lines).render
|
||||
end
|
||||
lines(input_lines)
|
||||
end.render($stderr)
|
||||
|
||||
puts input_lines if @params[:p]
|
||||
print input if @params[:p]
|
||||
end
|
||||
end
|
||||
|
||||
def histogram(input_lines)
|
||||
|
Loading…
Reference in New Issue
Block a user