@@ -380,15 +380,15 @@ def test_val_in_range():
380380 ('linear' , 10.0 , True ),
381381 ('linear' , - 10.0 , True ),
382382 ('linear' , 0.0 , True ),
383- ('linear' , np .inf , True ),
384- ('linear' , np .nan , True ),
383+ ('linear' , np .inf , False ),
384+ ('linear' , np .nan , False ),
385385
386386 # LogScale: Only positive values (> 0)
387387 ('log' , 1.0 , True ),
388388 ('log' , 1e-300 , True ),
389389 ('log' , 0.0 , False ),
390390 ('log' , - 1.0 , False ),
391- ('log' , np .inf , True ),
391+ ('log' , np .inf , False ),
392392 ('log' , np .nan , False ),
393393
394394 # LogitScale: Strictly between 0 and 1
@@ -405,7 +405,7 @@ def test_val_in_range():
405405 ('symlog' , 10.0 , True ),
406406 ('symlog' , - 10.0 , True ),
407407 ('symlog' , 0.0 , True ),
408- ('symlog' , np .inf , True ),
408+ ('symlog' , np .inf , False ),
409409 ('symlog' , np .nan , False ),
410410 ]
411411
@@ -429,5 +429,7 @@ def test_val_in_range_base_fallback():
429429 assert s .val_in_range (1.0 ) is True
430430 assert s .val_in_range (- 5.5 ) is True
431431
432- # NaN check: fallback uses 'vmin == vmax'
432+ # NaN and Inf returns False since they cannot be drawn in a plot
433433 assert s .val_in_range (np .nan ) is False
434+ assert s .val_in_range (np .inf ) is False
435+ assert s .val_in_range (- np .inf ) is False
0 commit comments