auto_range

Full name: ase2sprkkr.visualise.plot.auto_range

ase2sprkkr.visualise.plot.auto_range(rng, data)[source]

Fill the missing value in the given range by the data.

>>> auto_range( (None, None), [2,5,-3,7] )
(-3, 7)
>>> auto_range( (None, 4), [2,5,-3,7] )
(-3, 4)
>>> auto_range( (2, 4), [2,5,-3,7] )
(2, 4)