From a8073bc6848a2a04b551dc60391ffec7dd347ca0 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Thu, 10 Jun 2021 11:19:35 +0900 Subject: [PATCH] Convert xlim and ylim types to numbers Fix (#18) --- lib/youplot/parser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/youplot/parser.rb b/lib/youplot/parser.rb index d8691e4..15a5731 100644 --- a/lib/youplot/parser.rb +++ b/lib/youplot/parser.rb @@ -171,13 +171,13 @@ module YouPlot def sub_parser_add_xlim sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v| - params.xlim = v + params.xlim = v.map(&:to_f) end end def sub_parser_add_ylim sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v| - params.ylim = v + params.ylim = v.map(&:to_f) end end