From 3b34ca0e271d5b7b67bf28a5ea66fd82f5bfe4dd Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Wed, 20 Jan 2021 19:14:58 +0900 Subject: [PATCH] Fix a bug --- lib/youplot/backends/unicode_plot_backend.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/youplot/backends/unicode_plot_backend.rb b/lib/youplot/backends/unicode_plot_backend.rb index 6caa89c..7a21f29 100644 --- a/lib/youplot/backends/unicode_plot_backend.rb +++ b/lib/youplot/backends/unicode_plot_backend.rb @@ -109,7 +109,7 @@ module YouPlot params.name ||= headers[0] if headers params.xlim ||= series2.map(&:first).flatten.minmax # why need? params.ylim ||= series2.map(&:last).flatten.minmax # why need? - x1, y1 = series.shift + x1, y1 = series2.shift plot = UnicodePlot.public_send(method1, x1, y1, **params.to_hc) series2.each_with_index do |(xi, yi), i| UnicodePlot.public_send(method2, plot, xi, yi, name: headers&.[]((i + 1) * 2))