Skip to content

Commit a8073bc

Browse files
committed
Convert xlim and ylim types to numbers
Fix (#18)
1 parent 23bb767 commit a8073bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/youplot/parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ def sub_parser_add_canvas
171171

172172
def sub_parser_add_xlim
173173
sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v|
174-
params.xlim = v
174+
params.xlim = v.map(&:to_f)
175175
end
176176
end
177177

178178
def sub_parser_add_ylim
179179
sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v|
180-
params.ylim = v
180+
params.ylim = v.map(&:to_f)
181181
end
182182
end
183183

0 commit comments

Comments
 (0)