Convert xlim and ylim types to numbers

Fix (#18)
This commit is contained in:
kojix2 2021-06-10 11:19:35 +09:00
parent 23bb767afe
commit a8073bc684

View File

@ -171,13 +171,13 @@ module YouPlot
def sub_parser_add_xlim def sub_parser_add_xlim
sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v| 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
end end
def sub_parser_add_ylim def sub_parser_add_ylim
sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v| 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
end end