Closed schneems closed 4 years ago
OK. I'll make the modification to let render
put a newline at the end of the output.
Thank you for your feedback!
Another solution is using IO#puts
like below:
x = Array.new(100) { rand(10) } + Array.new(100) { rand(30) + 10 }
plot = UnicodePlot.histogram(x, title: "Histogram")
$stdout.puts(plot)
But, in this method the renderer cannot get real tty's property, so the result isn't colored.
This restriction in using Plot#to_s
is also a bug I want to fix.
Thank you for this fix and for this fantastic library!
Currently when you execute this code:
You will get this output:
Can we add an extra newline so that the label on the bottom of the graph isn't rendered on the same line as the next shell input?