math domain error in axis_max
grandrew opened this issue · comments
Andrew Gree commented
GENERATE_ERROR
Traceback (most recent call last):
File "./evsvg.py", line 183, in plotwh
max_val, valueMid, timeMid, secondsMid, neg_val, msg, points = generate_points(value_cache[hashstr])
File "./evsvg.py", line 123, in generate_points
max_val = axis_max(max_val,neg_val)
File "./evsvg.py", line 78, in axis_max
max_y = (Math.floor(dig/Math.pow(10,Math.floor(Math.log10(dig))))+1)*Math.pow(10,Math.floor(Math.log10(dig)));
ValueError: math domain error
Andrew Gree commented
the problem is when all the data in plot are zeros and max_val == 0