def calc_limits(data, dist=None, padding=<NUM_LIT>):
dmin = sys.float_info.max if dist is None else dist.get('<STR_LIT>',<EOL>sys.float_info.max)<EOL>dmax = sys.float_info.min if dist is None else dist.get('<STR_LIT>',<EOL>sys.float_info.min)<EOL>_min = min(min(data), dmin)<EOL>_max = max(max(data), dmax)<EOL>padding = padding * (_max - _min)<EOL>return _min - padding, _max + padding<EOL>
Calculate a suitable range for a histogram

    Returns:
        tuple of (min, max)